consider the following structure:
struct num nam{
int no;
char name[25];
};
struct num nam
n1[]={{12,"Fred"},{15,"Martin"},{8,"Peter"},{11,Nicholas"}};
.....
.....
printf("%d%d",n1[2],no,(*(n1 + 2),no) + 1);
What does the above statement print?
a.8,9
b.9,9
c.8,8
d.8,unpredictable value
Answer Posted / jai
Compilation error. Otherwise if rewritten printf statement
is:
printf("%d,%d", n1[2].no, (*(n1+2).no)+1);
then answer is a. 8,9
| Is This Answer Correct ? | 6 Yes | 0 No |
Post New Answer View All Answers
how to construct a simulator keeping the logical boolean gates in c
write a program in C that prompts the user for today's date,tomorrow's date and display the results.Use structures for today's date,tomorrow's date and an array to hold the days for each month of the year.
What is the advantage of an array over individual variables?
What is an lvalue in c?
Is swift based on c?
What is header file definition?
What is the stack in c?
What is wrong in this statement?
any limit on the number of functions that might be present in a C program a) max 35 functions b) max 50 functions c) no limit d) none of the above
Explain how are portions of a program disabled in demo versions?
Why is extern used in c?
What is structure padding and packing in c?
What is the benefit of using const for declaring constants?
What is the full form of getch?
What is header file in c?