โช Choose the correct option.
What will be the size of these structures?
#include
struct S1 {
char c;
int i[2];
double v;
} SA1;
struct S2 {
double x;
int i[2];
char c;
} SA2;
int main()
{
printf("
sizeof S1 %d : Sizeof S2 %d ",sizeof(SA1),sizeof(SA2));
return 0;
}
#include
struct S1 {
char c;
int i[2];
double v;
} SA1;
struct S2 {
double x;
int i[2];
char c;
} SA2;
int main()
{
printf("
sizeof S1 %d : Sizeof S2 %d ",sizeof(SA1),sizeof(SA2));
return 0;
}
Note:char takes 1 byte, int takes 4 bytes, double takes 8 bytes