Which will be the output? #include<stdio.h> int main () { char i=65; printf (“%d”, sizeof(i)); return 0; } 4 8 2 1
Question
Which will be the output? #include<stdio.h> int main () { char i=65; printf (“%d”, sizeof(i)); return 0; }
4
8
2
1
🧐 Not the exact question you are looking for?Go ask a question
Solution
The output will be 1.
Explanation: In the C programming language, the sizeof operator is used to get the size of a variable type or a variable. In this case, the variable 'i' is of type char. The size of the char data type is always 1 byte. Therefore, the output of the program will be 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.