retagged by
3,258 views

1 Answer

0 votes
0 votes

could have gone with 12 .

Struct{

int a //4B

char b //1B

float c //4B
}

 


//max allocation based on instruction sequence,4+1+4 which is allocated as 4+4+4 = 12B

10 being the nearest to the answer.

*Edit 15th Jan 2023 ,16:20
GNU-GCC- version 7.5.0 – C language

You can see the answer is 12B

edited by

Related questions

1.2k
views
3 answers
2 votes
Laahithyaa VS asked Sep 9, 2023
1,158 views
. What will be the value returned by the following function, when it is called with 11?recur (int num){if ((num / 2)! = 0 ) return (recur (num/2) *10+num%2) ... value, because it goes into an infinite loop (b) 11 (c) 1011 (d) None of these
3.5k
views
1 answers
10 votes
Arjun asked Nov 17, 2014
3,476 views
main() { int i =300; char *ptr=&i; *++ptr=2; printf("%d",i); }
4.2k
views
1 answers
0 votes
Karthik Akula asked Oct 29, 2016
4,190 views
what is the output for the below program ?main() { float x=1/2; float y=1/2.0; printf("%f, %f", x,y); }A) 0.500000, 0.500000B) 0.500000, 0.000000C) 0.000000, 0.000000D) 0.000000, 0.500000