GeeksforGeeks » Interview Questions

TCS Interview Question for Software Engineer/Developer about MCQ

(2 posts)

Tags:

  1. tcs
    guest
    Posted 1 year ago #

    consider the following program

    main()
    {
     int a[5]={1,3,6,7,0};
     int *b;
     b=&a[2];
    }
    

    the value of b[-1] is
    a.1
    b.3
    c.-6
    d.none

  2. kapil
    guest
    Posted 1 year ago #

    3. I tried the following code.

    main()
    {
     int a[5]={1,3,6,7,0};
     int *b;
     b=&a[2];
     printf("%d", b[-1]);
     getchar();
    }
    

Reply

You must log in to post.

RSS feed for this topic