Defence Exam  >  Defence Questions  >  The following C declarationstruct node {int i... Start Learning for Free
The following C declaration 
struct node {
int i ;
float j ;
} ;
struct node * S[10] ;
Define S to be
  • a)
    An array each element of which is a pointer to a structure of type node.
  • b)
    A structure of 2 fields, each field being a pointer to an array of 10 elements.
  • c)
    A structure of 3 fields, an integer, a float and an array of 10 elements
  • d)
    An array each element of which is a structure of type node
Correct answer is option 'A'. Can you explain this answer?
Verified Answer
The following C declarationstruct node {int i ;float j ;} ;struct node...
As it as an array of pointers to struct type.
View all questions of this test
Most Upvoted Answer
The following C declarationstruct node {int i ;float j ;} ;struct node...
Explanation:

The given C declaration is as follows:

```c
struct node {int i; float j;} ;
struct node * S[10] ;
```

Let's break down the declaration and analyze each part:

a) An array each element of which is a pointer to a structure of type node.

In this option, `S` is declared as an array with 10 elements. Each element of the array is a pointer to a structure of type `node`. This means that each element of `S` can hold the address of a `node` structure.

b) A structure of 2 fields, each field being a pointer to an array of 10 elements.

In this option, `S` is declared as a structure with 2 fields. Each field is a pointer to an array of 10 elements. This means that `S` itself is a structure, and each field of `S` is a pointer to an array.

c) A structure of 3 fields, an integer, a float, and an array of 10 elements.

In this option, `S` is declared as a structure with 3 fields. The first field is an integer, the second field is a float, and the third field is an array of 10 elements. This means that `S` itself is a structure containing an integer, a float, and an array.

d) An array each element of which is a structure of type node.

In this option, `S` is declared as an array with 10 elements. Each element of the array is a structure of type `node`. This means that each element of `S` is a `node` structure.

Conclusion:

Based on the given C declaration, option `A` is the correct answer. This is because the declaration `struct node * S[10]` defines `S` as an array in which each element is a pointer to a structure of type `node`.
Explore Courses for Defence exam
The following C declarationstruct node {int i ;float j ;} ;struct node * S[10] ;Define S to bea)An array each element of which is a pointer to a structure of type node.b)A structure of 2 fields, each field being a pointer to an array of 10 elements.c)A structure of 3 fields, an integer, a float and an array of 10 elementsd)An array each element of which is a structure of type nodeCorrect answer is option 'A'. Can you explain this answer?
Question Description
The following C declarationstruct node {int i ;float j ;} ;struct node * S[10] ;Define S to bea)An array each element of which is a pointer to a structure of type node.b)A structure of 2 fields, each field being a pointer to an array of 10 elements.c)A structure of 3 fields, an integer, a float and an array of 10 elementsd)An array each element of which is a structure of type nodeCorrect answer is option 'A'. Can you explain this answer? for Defence 2024 is part of Defence preparation. The Question and answers have been prepared according to the Defence exam syllabus. Information about The following C declarationstruct node {int i ;float j ;} ;struct node * S[10] ;Define S to bea)An array each element of which is a pointer to a structure of type node.b)A structure of 2 fields, each field being a pointer to an array of 10 elements.c)A structure of 3 fields, an integer, a float and an array of 10 elementsd)An array each element of which is a structure of type nodeCorrect answer is option 'A'. Can you explain this answer? covers all topics & solutions for Defence 2024 Exam. Find important definitions, questions, meanings, examples, exercises and tests below for The following C declarationstruct node {int i ;float j ;} ;struct node * S[10] ;Define S to bea)An array each element of which is a pointer to a structure of type node.b)A structure of 2 fields, each field being a pointer to an array of 10 elements.c)A structure of 3 fields, an integer, a float and an array of 10 elementsd)An array each element of which is a structure of type nodeCorrect answer is option 'A'. Can you explain this answer?.
Solutions for The following C declarationstruct node {int i ;float j ;} ;struct node * S[10] ;Define S to bea)An array each element of which is a pointer to a structure of type node.b)A structure of 2 fields, each field being a pointer to an array of 10 elements.c)A structure of 3 fields, an integer, a float and an array of 10 elementsd)An array each element of which is a structure of type nodeCorrect answer is option 'A'. Can you explain this answer? in English & in Hindi are available as part of our courses for Defence. Download more important topics, notes, lectures and mock test series for Defence Exam by signing up for free.
Here you can find the meaning of The following C declarationstruct node {int i ;float j ;} ;struct node * S[10] ;Define S to bea)An array each element of which is a pointer to a structure of type node.b)A structure of 2 fields, each field being a pointer to an array of 10 elements.c)A structure of 3 fields, an integer, a float and an array of 10 elementsd)An array each element of which is a structure of type nodeCorrect answer is option 'A'. Can you explain this answer? defined & explained in the simplest way possible. Besides giving the explanation of The following C declarationstruct node {int i ;float j ;} ;struct node * S[10] ;Define S to bea)An array each element of which is a pointer to a structure of type node.b)A structure of 2 fields, each field being a pointer to an array of 10 elements.c)A structure of 3 fields, an integer, a float and an array of 10 elementsd)An array each element of which is a structure of type nodeCorrect answer is option 'A'. Can you explain this answer?, a detailed solution for The following C declarationstruct node {int i ;float j ;} ;struct node * S[10] ;Define S to bea)An array each element of which is a pointer to a structure of type node.b)A structure of 2 fields, each field being a pointer to an array of 10 elements.c)A structure of 3 fields, an integer, a float and an array of 10 elementsd)An array each element of which is a structure of type nodeCorrect answer is option 'A'. Can you explain this answer? has been provided alongside types of The following C declarationstruct node {int i ;float j ;} ;struct node * S[10] ;Define S to bea)An array each element of which is a pointer to a structure of type node.b)A structure of 2 fields, each field being a pointer to an array of 10 elements.c)A structure of 3 fields, an integer, a float and an array of 10 elementsd)An array each element of which is a structure of type nodeCorrect answer is option 'A'. Can you explain this answer? theory, EduRev gives you an ample number of questions to practice The following C declarationstruct node {int i ;float j ;} ;struct node * S[10] ;Define S to bea)An array each element of which is a pointer to a structure of type node.b)A structure of 2 fields, each field being a pointer to an array of 10 elements.c)A structure of 3 fields, an integer, a float and an array of 10 elementsd)An array each element of which is a structure of type nodeCorrect answer is option 'A'. Can you explain this answer? tests, examples and also practice Defence tests.
Explore Courses for Defence exam
Signup for Free!
Signup to see your scores go up within 7 days! Learn & Practice with 1000+ FREE Notes, Videos & Tests.
10M+ students study on EduRev