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
How can you allocate arrays or structures bigger than 64K?
What happens if a header file is included twice?
what is the basis for selection of arrays or pointers as data structure in a program
There seem to be a few missing operators ..
how to find anagram without using string functions using only loops in c programming
Why calloc is better than malloc?
1) There is a singing competition for children going to be conducted at a local club. Parents have been asked to arrive at least an hour before and register their children’s names with the Program Manager. Whenever a participant registers, the Program Manager has to position the name of the person in a list in alphabet order. Write a program to help the Program Manager do this by placing the name in the right place each time the Program Manger enters a name. The Logic should be written in Data Structures?
What is the use of #define preprocessor in c?
Can 'this' pointer by used in the constructor?
Explain what are global variables and explain how do you declare them?
What is the difference between if else and switchstatement
What is string in c language?
Are global variables static in c?
Add Two Numbers Without Using the Addition Operator
What is mean by Data Driven framework in QTP? Can any one answer me in details on this regard.