GeekInterview.com
   Home |  Tech FAQ  |   Interview Questions |  Placement Papers |  Tech Articles |  Learn |  Freelance Projects |  Online Testing |  Geeks Talk |  Job Postings |  Knowledge Base | Site Search |  Add/Ask Question

  GeekInterview.com  >  Placement Papers  >  TCS  >  C

 Print  |  
Question:  what is the output of following program?
#include
void main()
{
printf("%d%d",sizeof(NULL),sizeof(" "));
}




October 10, 2009 09:28:39 #9
 nirmal1989   Member Since: October 2009    Total Comments: 1 

RE: what is the output of following program?#includevoid main(){printf("%d%d",sizeof(NULL),sizeof(" "));}
 
If <stdio.h> is included it will print 42 which means sizeof null is 4 and that of char is 2.
     

 

Back To Question