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

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the use of static variable in c?

596


What is sizeof in c?

572


Can the curly brackets { } be used to enclose a single line of code?

716


What are the advantages and disadvantages of c language?

563


Why do we need volatile in c?

749






What is default value of global variable in c?

564


What does the file stdio.h contain?

608


Why is not a pointer null after calling free?

599


What is the 'named constructor idiom'?

641


Why header file is used in c?

578


How can a process change an environment variable in its caller?

657


Subtract Two Number Without Using Subtraction Operator

358


What is unsigned int in c?

561


Simplify the program segment if X = B then C ← true else C ← false

2588


What is multidimensional arrays

634