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
Write the test cases for checking a variable having value in range -10.0 to +10.0?
What is sizeof return in c?
What is c programming structure?
What is scope rule in c?
What is the meaning of 2d in c?
What is the best way to comment out a section of code that contains comments?
Differentiate between Macro and ordinary definition.
what are bit fields? What is the use of bit fields in a structure declaration?
What is call by reference in functions?
Can we initialize extern variable in c?
What is the use of a static variable in c?
What is the stack in c?
What header files do I need in order to define the standard library functions I use?
Explain what are its uses in c programming?
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