Home » Programming & Data Structure » Programming and data structure miscellaneous » Question

Programming and data structure miscellaneous

Programming & Data Structure

  1. The following C declarations
    struct node {
      int i:
      float j;
    }
    struct node * s [10];
    define s to be
    1. an array, each element of which is a pointer to a structure of type node
    2. a structure of 2 fields, each field being a pointer to an array of 10 elements
    3. a structure of 3 fields: an integer, a float and an array of 10 elements
    4. an array, each element of which is a structure of type node
Correct Option: A

From the given declaration, it is obtained that s is an array denoted by s[10], containing 10 elements which are pointers indicated by the symbol, *, to structure of type node as defined by struct node statement.



Your comments will be displayed only after manual approval.