A
Q. What is the output of the code below considering the size of “short int” is 2, “char” is 1 and “int” is 4 bytes?
Code:
#include <stdio.h>
int main()
{
short int a = 20;
char b = 97;
printf("%d, %d, %d
", sizeof(a), sizeof(b), sizeof(b + a));
return 0;
}
int main()
{
short int a = 20;
char b = 97;
printf("%d, %d, %d
", sizeof(a), sizeof(b), sizeof(b + a));
return 0;
}
- Correct Answer - Option(B)
- Views: 34
- Filed under category C Programming
- Hashtags:
Discusssion
Login to discuss.