A

Admin • 833K Points
Coach

Q. Let x is an integer array with three elements having value 10, 20, and 30. What will be the output of the following statement?

Code:
printf("%u",x);
  • (A) Prints the value of 0th element (i.e., 10)
  • (B) Prints the garbage value
  • (C) An error occurs
  • (D) Print the address of the array (i.e., the address of first (0th) element
  • Correct Answer - Option(D)
  • Views: 29
  • Filed under category C Programming
  • Hashtags:

Explanation by: Admin

If we print the array (in this case, x). The output will be the memory address of the array (i.e., the address of first (0th) element.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.