[Updated] Goldman Sachs Aptitude Test Questions and Answers
Practice List of TCS Digital Coding Questions !!!
Take 50+ FREE!! Online Data Interpretation Mock test to crack any Exams.

Cisco Interview Questions and Answers for 7 years Experience

Home > Experience Archives > Cisco > Interview Question Set 10
Written Round First Round (F-2-F)

    1 / 6

    Write the Output.

    #include

    int main()
    {
    int x = 257;
    char *p = (char *)&x;
    printf("%d ",*p++);
    ++*p;
    printf("%d ",*p++);
    printf("%d ",x);
    }

    Answer:
    No Discussion on this question yet!
    Please Login First :
    Tags:

    No Tags on this question yet!

    2 / 6

    Write the Output.

    #include
    union x {
    int a;
    int b;
    int c;
    }x;
    struct y {
    int c;
    int b;
    int a;
    }y;

    int main()
    {
    union x *ul, u;
    struct y *sl, s;
    u.a = 10;
    u.b = 20;
    u.c = 30;
    printf("%d %d %d \n", u.a, u.b, u.c);
    s.c = 10;
    s.b = 20;
    s.a = 30;
    printf("%d %d %d \n", s.a, s.b, s.c);
    sl = (struct y*) &u;
    printf("%d %d %d \n", sl->a, sl->b, sl->c);
    }

    Answer:
    30 30 30                                                                                                                       
    30 20 10                                                                                                                       
    0 0 30
    Please Login First :
    Tags:

    No Tags on this question yet!

    3 / 6

    Write the Output.

    #include
    void foo(int b[][3],int n);
    int main()
    {
    int i,j;
    int a[3][3] = {{1,2,3},{4,5,6}, {7,8,9}};
    foo(a,a[0][1]);
    a[1][0]=sizeof(a);
    a[2][1] = sizeof(a[0]);

    for (i=0;i<3;i++) {
    for (j=0;j<3;j++)
    {
    printf(" %d ",a[i][j]);
    }
    }
    }
    void foo(int b[][3],int n)
    {
    b[1][1] = ++n;
    }

    Answer:
    No Discussion on this question yet!
    Please Login First :
    Tags:

    No Tags on this question yet!

    4 / 6

    What will be the output for the below program.

    Input:
    anjazef
    zereaf

    Program:

    int main(int argc, char *argv[])
    {
    if (argc<1)
    return;
    char *p = malloc(100);
    if (p == NULL)
    {
    return;
    }
    memset(p,'\0',9);
    strncpy(p,argv[1],9);
    while (*p != '\0')
    {
    if ()
    }
    }

    Answer:
    No Discussion on this question yet!
    Please Login First :
    Tags:

    No Tags on this question yet!

    5 / 6

    write program to merge two sorted linked list.

    Answer:
    No Discussion on this question yet!
    Please Login First :
    Tags:

    No Tags on this question yet!

    6 / 6

    write program to find the depth of binary tree.

    Answer:
    No Discussion on this question yet!
    Please Login First :
    Tags:

    No Tags on this question yet!

Written Round First Round (F-2-F)