Follow Our FB Page << CircleMedia.in >> for Daily Laughter. We Post Funny, Viral, Comedy Videos, Memes, Vines...


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

Input is "rama loves rajesh and rajesh Loves rama also and rajesh wear gloves and bloves" To print output is count the numbers of times repeted the word love without case sensitive.

0 Answers  


what is the difference between declaration and definition of a variable or function ?

3 Answers  


Is stack a keyword in c?

0 Answers  


Why doesnt long int work?

0 Answers  


what would be the output of the following program? main() { int k = 123; char *ptr; ptr = &k; printf("%d",*ptr); }

4 Answers  






Write a C/C++ program that connects to a MySQL server and checks if the InnoDB plug-in is installed on it. If so, your program should print the total number of disk writes by MySQL

0 Answers  


How can you print HELLO WORLD without using "semicolon"?

7 Answers   HCL, Infosys,


Write a program in "C" to calculate the root of a quadratic equation ax^2+bx+c=0, where the value of a,b & c are known.

0 Answers  


In which mode we open the file for read,write and append also in c ? a)W b)w+ c)r+ d)a

2 Answers   BitWise,


If errno contains a nonzero number, is there an error?

0 Answers  


Write a program to write a given string in maximum possibilities? i.e str[5]="reddy"; i.e we can write this string in 120 ways for that write a program

3 Answers   Subex,


illustrate the use of address operator and dereferencing operator with the help of a program guys plzzz help for this question

0 Answers  


Categories