Predict the output or error(s) for the following:
25. main()
{
printf("%p",main);
}

Answers were Sorted based on User's Feedback



Predict the output or error(s) for the following: 25. main() { printf("%p",main); } ..

Answer / surenda pal singh chouhan

Some address will be printed.

Explanation:
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.

26. main()

Is This Answer Correct ?    28 Yes 2 No

Predict the output or error(s) for the following: 25. main() { printf("%p",main); } ..

Answer / khushboo

i tried it out.. on my system it gives the answer 0291. does
anybodyy esle gets the same answer?

Is This Answer Correct ?    12 Yes 2 No

Predict the output or error(s) for the following: 25. main() { printf("%p",main); } ..

Answer / sandeep

Yaaa Even i got the output as 0291

Is This Answer Correct ?    5 Yes 2 No

Post New Answer

More C Interview Questions

What is local and global variable in c?

0 Answers  


what is answer for perfect number????????????????

1 Answers  


How is pointer initialized in c?

0 Answers  


why we are using semicolon at the end of printh statment

2 Answers   HCL,


What is use of null pointer in c?

0 Answers  


C,c++, Java is all are structural oriented or procedure oriented language..?

6 Answers  


Write a program to reverse a given number in c language?

0 Answers  


what is the difference between char * const and const char *?

2 Answers   TCS,


Write a C program to perform some of the operation which can be performed using Single linked list

1 Answers   Qualcomm,


Define the scope of static variables.

0 Answers  


Is c language still used?

0 Answers  


What happens if header file is included twice?

0 Answers  


Categories