A

Admin • 833.24K Points
Coach

Q. Determine Output

Code:
void main()
{
printf("%p", main);
}
  • (A) Error
  • (B) make an infinite loop
  • (C) Some address will be printed
  • (D) None of These
  • Correct Answer - Option(C)
  • Views: 24
  • Filed under category C Programming
  • Hashtags:

Explanation by: Admin

Function names are just addresses (just like array names are addresses). main() is also a function. So the address of function main will be printed. %p in printf() specifies that the argument is an address. They are printed as hexadecimal numbers.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.