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
What are the two forms of #include directive?
I need previous papers of CSC.......plz help out by posting them.......
How can I get back to the interactive keyboard if stdin is redirected?
What is header file in c?
int i[2], j; int *pi;i[0] = 1; i[1] = 5; pi = i; j = *pi + 1 + *(pi + 1)Value of j after execution of the above statements will be a) 7 b) 6 c) 4 d) pointer
What are file streams?
What is the maximum no. of arguments that can be given in a command line in C.?
Who developed c language and when?
Explain how can you tell whether two strings are the same?
differentiate built-in functions and user – defined functions.
Write a C program on Centralized OLTP, Decentralized OLTP using locking mechanism, Semaphore using locking mechanism, Shared memory, message queues, channel of communication, sockets and a simple program on Saving bank application program using OLTP in IPC?
What are derived data types in c?
write a program for the normal snake games find in most of the mobiles.
develop algorithms to add polynomials (i) in one variable
What is your stream meaning?