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

how 2 compile & execute c program with out using editor?

2 Answers   HP,


What are the advantages of external class?

0 Answers  


How can I recover the file name given an open stream or file descriptor?

0 Answers  


What is the output of the following program #include<stdio.h> main() { int i=0; fork(); printf("%d",i++); fork(); printf("%d",i++); fork(); wait(); }

8 Answers   ADITI, Adobe,


Why the use of alloca() is discouraged?

2 Answers   Oracle,






Explain data types & how many data types supported by c?

0 Answers  


what is purpose of fflush(stdin) function

4 Answers  


Given a piece of code int x[10]; int *ab; ab=x; To access the 6th element of the array which of the following is incorrect? (A) *(x+5) (B) x[5] (C) ab[5] (D) *(*ab+5} .

2 Answers   Oracle,


Write a program to print this triangle: * ** * **** * ****** * ******** * ********** Don't use printf statements;use two nested loops instead. you will have to use braces around the body of the outer loop if it contains multiple statements.

6 Answers   Wipro,


What is nested structure with example?

0 Answers  


the maximum length of a character constant can be a) 1 character b) 8 characters c) 256 chaacters d) 125 characters

0 Answers  


Explain heap and queue.

0 Answers   Aricent,


Categories