union
{
char ch[10];
short s;
}test;
test.s = 0xabcd;
main()
{
printf("%d",ch[10]);
}
Answer Posted / vipul
the program is incorrect bcz in main function %d is used for integer type value and union is same as the structure and there is no return type in the main function thus it will return a charter type value,
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
p*=(++q)++*--p when p=q=1 while(q<=6)
Does c have class?
What is #include stdio h and #include conio h?
Which is better oop or procedural?
How a string is stored in c?
Is there a built-in function in C that can be used for sorting data?
What are the 4 types of functions?
What is the newline escape sequence?
What is the purpose of sprintf?
What is break in c?
Is it possible to have a function as a parameter in another function?
Explain c preprocessor?
What is a sequential access file?
Explain what are linked list?
how to print electricity bill according to following charges first 100 units -1rs per unit for next 200 units-1.50 rs per unit without using conditions