union
{
char ch[10];
short s;
}test;
test.s = 0xabcd;
main()
{
printf("%d",ch[10]);
}
Answer Posted / shrikant auti
The code written is incorrect......
union
{
char ch[10];
short s;
}test;
test.s = 0xabcd;
main()
{
printf("%d",ch[10]);/*%D CAN'T BE USED FOR CHARACTER
EXTRACTION*/
}
| Is This Answer Correct ? | 3 Yes | 1 No |
Post New Answer View All Answers
Give differences between - new and malloc() , delete and free() ?
What is a pointer value and address in c?
Explain how do you use a pointer to a function?
Can you tell me how to check whether a linked list is circular?
Which is more efficient, a switch statement or an if else chain?
What is c basic?
What is the purpose of 'register' keyword?
2) Write a program that will help Air Traffic Control for an airport to view the sequence of flights ready for take-off. The airport can accommodate 10 flights waiting for take-off at any point in time. Each flight has a unique 3 digit numeric identifier. Each time a flight takes-off, Air Traffic Control adds a flight to the waitlist. Each time a flight is added to the waitlist, the list of flights waiting to take-off must be displayed. When a flight is cleared for take-off, Air Traffic Control removes the flight from the waitlist. Each time a flight takes-off, the list of flights waiting to take-off must be displayed. Sequence of take-off is the sequence of addition to the waitlist
Iam a B.Tech graduate and completed my engineering in 2009, from 2005 to 2009 and after that i had done nothing.Now i want to do job and get into BPO field . Friends give me suggestions as what to say in interview... if they ask me that what would you had done ... these many years without doing job ??????? pls urgent
What is the difference between procedural and declarative language?
in multiple branching construct "default" case is a) optional b) compulsarily c) it is not include in this construct d) none of the above
How to write c functions that modify head pointer of a linked list?
What are the types of type qualifiers in c?
Explain a file operation in C with an example.
Give a one-line C expression to test whether a number is a power of 2. [No loops allowed - it's a simple test.]