A

Admin • 828.03K Points
Coach

Q. What is the output of the following code?

Code:
int arr[] = {1,2,3};
printf("%d", *(arr+1));
  • (A) 1
  • (B) 2
  • (C) 3
  • (D) Undefined
  • Correct Answer - Option(B)
  • Views: 10
  • Filed under category C Programming
  • Hashtags:

Explanation by: Admin
arr+1 points to the second element of the array.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.