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 quick sort in c?
Array is an lvalue or not?
Write a C program to help a HiFi’s Restaurant automate its breakfast billing system. Your assignment should implement the following items: a. Show the customer the different breakfast items offered by the HiFi’s Restaurant. b. Allow the customer to select more than one item from the menu. c. Calculate and print the bill to the customer. d. Produce a report to present your complete program and show more sample output. Assume that the HiFi’s Restaurant offers the following breakfast menu: Plain Egg $2.50 Bacon and Egg $3.45 Muffin $2.20 French Toast $2.95 Fruit Basket $3.45 Cereal $0.70 Coffee $1.50 Tea $1.80
What is the difference between ‘g’ and “g” in C?
console I/O functions means a) the I/O operations done on disk b) the I/O operations done in all parts c) the input given through keyboard is displayed VDU screen d) none of the above
What is the meaning of ?
What is const and volatile in c?
What is scope rule of function in c?
The % symbol has a special use in a printf statement. How would you place this character as part of the output on the screen?
How do you list files in a directory?
What is a pragma?
What is static memory allocation? Explain
Simplify the program segment if X = B then C ← true else C ← false
Explain indirection?
Can two or more operators such as and be combined in a single line of program code?