A

Admin • 828.03K Points
Coach

Q. What is the output of C program with arrays and pointers.?

Code:
int main()
{
int size=4;
int a[size];
a[0]=5;a[1]=6;
a[2]=7;a[3]=8;
printf("%d %d", *(a+2), a[1]);
}
  • (A) 8 6
  • (B) 7 6
  • (C) 6 6
  • (D) Compiler error
  • Correct Answer - Option(B)
  • Views: 9
  • Filed under category C Programming
  • Hashtags:

No solution found for this question.
Add Solution and get +2 points.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.