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
can any one please explain, how can i access hard disk(physical address)? it is possible by the use of far,near or huge pointer? if yes then please explain......
What is the difference between %d and %i?
How can I pad a string to a known length?
What header files do I need in order to define the standard library functions I use?
How can you check to see whether a symbol is defined?
Explain how can you check to see whether a symbol is defined?
What is the difference between text files and binary files?
How to define structures? ·
In this problem you are to write a program that will cut some number of prime numbers from the list of prime numbers between 1 and N.Your program will read in a number N; determine the list of prime numbers between 1 and N; and print the C*2 prime numbers from the center of the list if there are an even number of prime numbers or (C*2)-1 prime numbers from the center of the list if there are an odd number of prime numbers in the list.
hi to every one .. how to view table pool after creating the pooled table? plz help me.. if any knows abt this ..
Why double pointer is used in c?
What is c standard library?
List the difference between a "copy constructor" and a "assignment operator"?
What is LINKED LIST? How can you access the last element in a linked list?
By using C language input a date into it and if it is right?