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
What is #include cctype?
please send me the code for multiplying sparse matrix using c
What is union and structure?
can anyone please tell about the nested interrupts?
I have a varargs function which accepts a float parameter?
How can I sort more data than will fit in memory?
What is a null pointer in c?
What is structure packing in c?
Why c language is called c?
How would you rename a function in C?
What is keyword with example?
Write a C Program That Will Count The Number Of Even And Odd Integers In A Set using while loop
How can I invoke another program (a standalone executable, or an operating system command) from within a c program?
Without Computer networks, Computers will be half the use. Comment.
What will the preprocessor do for a program?