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 sizeof int?
What is a rvalue?
how to print electricity bill according to following charges first 100 units -1rs per unit for next 200 units-1.50 rs per unit without using conditions
What is difference between arrays and pointers?
A global variable when referred to in another file is declared as this a) local variable b) external variable c) constant d) pointers
Hello. How to write a C program to check and display president party like if i type in the console "biden" and hit enter the output shoud be : "biden is democrat" and if i type "trump" and hit enter the output shoud be: "trump is republican"
When should a type cast be used?
What is huge pointer in c?
Explain what is the stack?
How many levels deep can include files be nested?
What is the difference between array and structure in c?
When can a far pointer be used?
Explain how do you print an address?
printf(), scanf() these are a) library functions b) userdefined functions c) system functions d) they are not functions
What header files do I need in order to define the standard library functions I use?