Note 1

Take Note:

Take a note while surfing.





Note With Ink

Give your Note a Colorful Tag.




Easy to Access

Stay on same information and in Sync wherever you are.

Note 2

Take Note:

Organize your information,It may take Shape.





Think With Ink

Differ your Content by Color.




Easy to Access

Easy to pull up your content from anywhere anytime.

Note 3

Take Note:

Don't Let information to miss,Because it take shape





Note With Ink

Simple an Easy Way to take a note.




Easy to Access

Get the same in next visit.

C Programming :: Structures, Unions, Enums

Home > C Programming > Structures, Unions, Enums > General Questions

31. A short integer occupies 2 bytes, an ordinary integer 4 bytes and a long integer occupies 8 bytes of memory.
A structure is defined as

struct TAB {
short a;
int b;
long c;
} TABLE [10];

Then the total memory requirement for TABLE is

View Answer | Discuss in Forum | Workspace | Asked In |

Answer: Option B

Explanation:

Here is no explanation for this answer

Workspace

Tags:

No Tags on this question yet!

View Answer | Discuss in Forum | Workspace | Asked In |

Answer: Option B

Explanation:

Here is no explanation for this answer

Workspace

Tags:

No Tags on this question yet!

View Answer | Discuss in Forum | Workspace | Asked In |

Answer: Option B

Explanation:

Here is no explanation for this answer

Workspace

Tags:

No Tags on this question yet!

View Answer | Discuss in Forum | Workspace | Asked In |

Answer: Option A

Explanation:

Here is no explanation for this answer

Workspace

Tags:

No Tags on this question yet!

35. Consider the following declarations.

union id {
char color;
int size;
}
struct {
char country;
int date;
union id;
} flag;

To assign a color to a fag, the correct statement would be

View Answer | Discuss in Forum | Workspace | Asked In |

Answer: Option B

Explanation:

Here is no explanation for this answer

Workspace

Tags:

No Tags on this question yet!

36. union
{
char *p;
int i;
char b;
}
void main()
{
--
p=(char*)malloc(8*sizeof(char));
}

What is the size of union?

View Answer | Discuss in Forum | Workspace | Asked In |

Answer: Option A

Explanation:

Here is no explanation for this answer

Workspace

Tags:

Cisco 

37. Given the following statement
enum day = { jan = 1 ,feb=4, april, may}
What is the value of may?

View Answer | Discuss in Forum | Workspace | Asked In |

Answer: Option C

Explanation:

Here is no explanation for this answer

Workspace

Tags:

Cisco 

38. struct s1
{
struct {
struct {
int x;
}s2
}s3
}y;
How to access x in the above given structure definition ?

View Answer | Discuss in Forum | Workspace | Asked In |

Answer: Option C

Explanation:

Here is no explanation for this answer

Workspace

Tags:

Cisco 

39. #include
union {
int no;
char ch;
} u;

int main()
{
u.ch = '2';
u.no = 0;
printf ("%d", u.ch);
return 0;
}

View Answer | Discuss in Forum | Workspace | Asked In |

Answer: Option A

Explanation:

Here is no explanation for this answer

Workspace

Tags:

No Tags on this question yet!

40. The following statement is

"The size of a struct is always equal to the sum of the sizes of its members"

View Answer | Discuss in Forum | Workspace | Asked In |

Answer: Option A

Explanation:

Here is no explanation for this answer

Workspace

Tags:

No Tags on this question yet!