ALLInterview.com :: Home Page KalAajKal.com
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage  Contact Us     Login  |  Sign Up                      
info       Did you received any Funny E-Mails from your Friends and like to share with rest of our friends? Yeah!! you can post that stuff   HERE
Google
 
Categories  >>  Software  >>  Programming Languages  >>  C
 
 


 

 
 C interview questions  C Interview Questions
 C++ interview questions  C++ Interview Questions
 VC++ interview questions  VC++ Interview Questions
 Delphi interview questions  Delphi Interview Questions
 Programming Languages AllOther interview questions  Programming Languages AllOther Interview Questions
Question
Predict the output or error(s) for the following:
25.   main()
{
printf("%p",main);
}
 Question Submitted By :: Surenda Pal Singh Chouhan
I also faced this Question!!     Rank Answer Posted By  
 
  Re: Predict the output or error(s) for the following: 25. main() { printf("%p",main); }
Answer
# 1
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 ?    7 Yes 0 No
Surenda Pal Singh Chouhan
 
  Re: Predict the output or error(s) for the following: 25. main() { printf("%p",main); }
Answer
# 2
i tried it out.. on my system it gives the answer 0291. does
anybodyy esle gets the same answer?
 
Is This Answer Correct ?    3 Yes 0 No
Khushboo
 
 
 
  Re: Predict the output or error(s) for the following: 25. main() { printf("%p",main); }
Answer
# 3
Yaaa Even i got the output as 0291
 
Is This Answer Correct ?    1 Yes 0 No
Sandeep
 

 
 
 
Other C Interview Questions
 
  Question Asked @ Answers
 
which one of follwoing will read a character from keyboard and store in c a)c=getc() b)c=getchar() c)c=getchar(stdin) d)getc(&c) e)none  5
Give a fast way to multiply a number by 7 Microsoft8
difference of two no's with out using - operator  6
how to find turn around time in operating system?  1
what is the first address that gets stored in stack according to a C or C++ compiler???? or what will be the first address that gets stored when we write a C source code???????? Apple2
how to convert binary to decimal and decimal to binary in C lanaguage  4
What's the best way to declare and define global variables?  5
To what value do nonglobal variables default? 1) auto 2) register 3) static  4
int arr[] = {1,2,3,4} int *ptr=arr; *(arr+3) = *++ptr + *ptr++; Final contents of arr[] Hughes4
find the output of the following program main() { int x=5, *p; p=&x; printf("%d",++*p); } TCS4
for(i=1;i>0;i++); printf("i=%d",i); what will be the answer????  6
How would you sort a linked list?  1
can we print any string in c language without using semicolon(;)(terminator) in whole program.  6
what is the use of fflush() function?  1
44.what is the difference between strcpy() and memcpy() function? 45.what is output of the following statetment? 46.Printf(“%x”, -1<<4); ? 47.will the program compile? int i; scanf(“%d”,i); printf(“%d”,i); 48.write a string copy function routine? 49.swap two integer variables without using a third temporary variable? 50.how do you redirect stdout value from a program to a file? 51.write a program that finds the factorial of a number using recursion?  3
DIFFERNCE BETWEEN THE C++ AND C LANGUAGE? Wipro1
print the following using nested for loop. 5 4 3 2 1 1 2 3 4 3 2 1 1 2 1 2 1 1 2 3 4 3 2 1 1 2 3 4 5  5
main() { int x=10,y=15; x=x++; y=++y; printf("%d %d\n",x,y); } output?? Ramco13
How do you write a program which produces its own source code as its output?  2
34.what are bitwise shift operators? 35.what are bit fields? What is the use of bit fields in a structure declaration? 36.what is the size of an integer variable? 37.what are the files which are automatically opened when a c file is executed? 38.what is the little endian and big endian? 39.what is the use of fflush() function? 40.what is the difference between exit() and _exit() functions? 41.where does malloc() function get the memory? 42.what is the difference between malloc() and calloc() function? 43.what is the difference between postfix and prefix unary increment operators?  2
 
For more C Interview Questions Click Here 
 
 
 
 
 
   
Copyright Policy  |  Terms of Service  |  Help  |  Site Map 1  |  Articles  |  Site Map  |   Site Map  |  Contact Us interview questions urls   External Links 
   
Copyright © 2007  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  Forum9.com   ::  KalAajKal.com