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


Please Help Members By Posting Answers For Below Questions

What is quick sort in c?

585


Array is an lvalue or not?

640


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

2556


What is the difference between ‘g’ and “g” in C?

2550


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

655






What is the meaning of ?

622


What is const and volatile in c?

566


What is scope rule of function in c?

552


The % symbol has a special use in a printf statement. How would you place this character as part of the output on the screen?

769


How do you list files in a directory?

563


What is a pragma?

670


What is static memory allocation? Explain

632


Simplify the program segment if X = B then C ← true else C ← false

2587


Explain indirection?

648


Can two or more operators such as and be combined in a single line of program code?

811