#include <stdio.h> struct student{ char *c; }; int main() { struct student s[2]; printf("%ld",sizeof(s)); return 0; } | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

#include <stdio.h> struct student{ char *c; }; int main() { struct student s[2]; printf("%ld",sizeof(s)); return 0; }

How

11th Sep 2020, 8:20 AM
Rohit Ahuja
Rohit Ahuja - avatar
3 Answers
+ 3
Its depends on the machine. if the size of the pointer is 8 bytes , you get 16 if 4 bytes , you get 8
11th Sep 2020, 9:41 AM
A S Raghuvanshi
A S Raghuvanshi - avatar
+ 1
Thx
11th Sep 2020, 8:34 AM
Rohit Ahuja
Rohit Ahuja - avatar
0
🙏 what is the output and how?
11th Sep 2020, 8:28 AM
Rohit Ahuja
Rohit Ahuja - avatar