Knowee
Questions
Features
Study Tools

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.

Similar Questions

What will be the output of the following program?

output:

What will be the output of the following code?

What will be the output of the following C++ code?

what will be the output of the c program?

1/4

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.