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
Solution 1
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. Knowee AI StudyGPT is a powerful AI-powered study tool designed to help you to solve study problem. Knowee AI StudyGPT is a powerful AI-powered study
designed to help you to solve study problem. Knowee AI StudyGPT is a powerful AI-powered study tool designed to help you to solve study problem. Knowee AI StudyGPT is a powerful AI-powered study tool designed to help you to solve study problem. Knowee AI StudyGPT is a powerful AI-powered study tool designed to help you to solve study problem. Knowee AI StudyGPT is a powerful AI-po
Similar Questions
Which will be the output? #include<stdio.h> int main () { char i=65; printf (“%d”, sizeof(i)); return 0; }
What will be the output of the following C code?
Which will be the output?#include<stdio.h>int main (){ char i=65; printf (“%d”, sizeof(i)); return 0;}ans.
What will be the output of the following Python code snippet?print(['hello', 'morning'][bool('')])Optionserrorhellomorningno output
What will be the output of the following Python code?print(['f', 't'][bool('spam')])Optionserrorftno output