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 / vignesh1988i
the above structure name is an invalid name , since it has encountered a space..... pl. rectify this error, and decleration of array of structure is also not valid...
if this errors are rectified , and we cant refer a structure through ',' operator.... only '.' or -> should be used... so, pl. try to correct it..
the o/p is : 8,9
thank u
| Is This Answer Correct ? | 2 Yes | 0 No |
Post New Answer View All Answers
Explain what is a pragma?
How can you read a directory in a C program?
program to convert a integer to string in c language'
How many loops are there in c?
Differentiate between full, complete & perfect binary trees.
What is difference between array and pointer in c?
I need a sort of an approximate strcmp routine?
How #define works?
What is the difference between new and malloc functions?
How can I open files mentioned on the command line, and parse option flags?
Explain how do you convert strings to numbers in c?
How to draw the flowchart for structure programs?
What is FIFO?
What is the sizeof () a pointer?
What are the 4 types of organizational structures?