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
given post order,in order construct the corresponding binary tree
How do you write a program which produces its own source code as output?
What is 02d in c?
What is enumerated data type in c?
What is the difference between text files and binary files?
What does dm mean sexually?
What is structure in c definition?
Write a program which returns the first non repetitive character in the string?
What is atoi and atof in c?
What is the purpose of scanf() and printf() functions?
What does the c preprocessor do?
the factorial of non-negative integer n is written n! and is defined as follows: n!=n*(n-1)*(n-2)........1(for values of n greater than or equal to 1 and n!=1(for n=0) Perform the following 1.write a c program that reads a non-negative integer and computes and prints its factorial. 2. write a C program that estimates the value of the mathematical constant e by using the formula: e=1+1/!+1/2!+1/3!+.... 3. write a c program the computes the value ex by using the formula ex=1+x/1!+xsquare/2!+xcube/3!+....
The number of bytes of storage occupied by short, int and long are a) 2, 2 and 4 b) 2, 4 and 4 c) 4, 4 and 4 d) none
A SIMPLE PROGRAM OF GRAPHICS AND THEIR OUTPUT I WANT SEE WAHAT OUTOUT OF GRAPHICS PROGRAM
Why is extern used in c?