Aspire's Library

A Place for Latest Exam wise Questions, Videos, Previous Year Papers,
Study Stuff for MCA Examinations - NIMCET

Previous Year Question (PYQs)



What is the output?

#include <stdio.h>
void main(){
  int i = -1;
  printf("sizeof(i) = %d", sizeof(i));
}





Solution

Explanation: The operator sizeof gives the size of the type in bytes, not the value. On most 32-bit and 64-bit systems, sizeof(int) is 4. $$ \text{Output: } \texttt{sizeof(i) = 4} $$


Online Test Series,
Information About Examination,
Syllabus, Notification
and More.

Click Here to
View More


Online Test Series,
Information About Examination,
Syllabus, Notification
and More.

Click Here to
View More

Ask Your Question or Put Your Review.

loading...