- 2
Why is my code showing an output of 4, 4, 8 despite writing a code for 1??
In this code: #include <stdio.h> int main() { printf("int: %ld \n", sizeof(int)); printf("float: %ld \n", sizeof(float)); printf("double: %ld \n", sizeof(double)); printf("char: %ld \n", sizeof(char)); return 0; }
3 Antworten
+ 1
I didn't understand your question. explain "despite writing a code for 1"? you wrote the code to print the memory size of each variable.
+ 1
Actually size depends on your operating system architectures. Your question is not clear u asking writing code for 1 char size is 1 so it should be print 1 which u have already done
0
What code should I write to print the output of 1??