2 years ago in C Structures And Unions

typedef struct{
char a[3];
short int b;
long int c;
char d[1];
int main(){
int c = sizeof(MYREG);
printf("%d", c);
return 0;
what will be the size of MYREG in 32 bit linux system?

[A] 10
[B] 16
Next Question

Overall Stats

Attempted 0
Correct 0
Incorrect 0
Viewed 0



Related Questions

Which operator is used to connect structure name to its member name?

  • [A] dot operator(.)
  • [B] logical operator(&&)
  • [C] pointer operator(&)
  • [D] Arrow operator(->)

For accessing a structure element using a pointer,you must use?

  • [A] Pointer operator (&)
  • [B] Dot operators(.)
  • [C] Pointer operator(*)
  • [D] Arrow operator(->)

Which of the following comment about Union is false?

  • [A] Union is a structure whose members share same memory area
  • [B] The compiler will keep track of what type of information is currently stored
  • [C] Only one of the members of union can be assigned a value at particular time
  • [D] Size allocated for Union is the size of its member needing the maximum storage

In C, structure values can be passed as arguments to function by?

  • [A] passing each member of the structure as an argument of function call
  • [B] passing copy of the entire structure to the called function
  • [C] passing structure as an argument using pointer
  • [D] All of above