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

Explain how do you determine whether to use a stream function or a low-level function?

0 Answers  


When was c language developed?

0 Answers  


program for swapping two strings by using pointers in c language

1 Answers  


What is the importance of c in your views?

0 Answers  


how to write palindrome program?

3 Answers  






What is array in C

0 Answers  


A function 'q' that accepts a pointer to a character as argument and returns a pointer to an array of integer can be declared as: A)int (*q(char*)) [] B)int *q(char*) [] C)int(*q)(char*) [] D)None of the Above

2 Answers   Accenture,


How can I find leaf node with smallest level in a binary tree?

1 Answers  


when to use : in c program?

2 Answers  


what is the output of the following program? #include<stdio.h> void main() { float x=1.1; while(x==1.1) { printf("\n%f",x); x=x-0.1; } }

6 Answers  


What are comments and how do you insert it in a C program?

0 Answers  


Explain what are the advantages and disadvantages of a heap?

0 Answers  


Categories