Which will be the output? #include<stdio.h> int main () { char i=65; printf (“%d”, sizeof(i)); return 0; } ans. 2 8 4 1
Question
Which will be the output? #include<stdio.h> int main () { char i=65; printf (“%d”, sizeof(i)); return 0; }
ans. 2
8
4
1
🧐 Not the exact question you are looking for?Go ask a question
Solution
The output will be 1.
Explanation: In C programming, the sizeof() operator is used to calculate the size of variables. Here, the variable 'i' is a character type, which always takes 1 byte of memory space. So, the sizeof(i) will return 1.
Upgrade your grade with Knowee
Get personalized homework help. Review tough concepts in more detail, or go deeper into your topic by exploring other relevant questions.