0
How it shows "int : 4".... there is nothing mentioned like "4"...
#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; }
4 Antworten
+ 4
The sizeof method returns the amount of memory allocated to a data type or an expression. The value for the same data type is different for 32 - bit and 64 - bit machines. The memory allocated to different data types in C is given below,
int - 4 bytes
float - 4 bytes
double - 8 bytes
char - 1 byte
+ 1
It means in C Program,,, for each integer needs 4 bytes....
Am I right....Mr. Soumik?
+ 1
Yes S.M. Rakibul Alam and I'm not a Mr.
0
Ok,,😅
Thank you.