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
Can variables be declared anywhere in c?
What is the difference between break and continue?
What is the use of clrscr?
What oops means?
Why should I use standard library functions instead of writing my own?
how many key words availabel in c a) 28 b) 31 c) 32
Where can I get an ansi-compatible lint?
What do you mean by c what are the main characteristics of c language?
What do header files do?
difference between object file and executable file
Can you write a programmer for FACTORIAL using recursion?
What is pragma in c?
`write a program to display the recomended action depends on a color of trafic light using nested if statments
What is nested structure in c?
Can a pointer be static?