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 / santlal kurmi
The correct answer is
a. 8,9
because *(n1+2) means a[2]
| Is This Answer Correct ? | 4 Yes | 0 No |
Post New Answer View All Answers
What is the purpose of the preprocessor directive error?
What is a stream water?
a=10;b= 5;c=3;d=3; if(a printf(%d %d %d %d a,b,c,d) else printf("%d %d %d %d a,b,c,d);
Write a program to reverse a given number in c language?
What are the different types of constants?
Write a program to print numbers from 1 to 100 without using loop in c?
What are the data types present in c?
Write a program to input the price of 1 burger and the number of burgers eaten by a group of friends .print the total amount to be paid by the group?
How does sizeof know array size?
Describe dynamic data structure in c programming language?
What is the purpose of main() function?
What functions are used for dynamic memory allocation in c language?
What is masking?
main() { printf("hello"); fork(); }
Explain what is meant by high-order and low-order bytes?