Home » C Programming » Structures » Question
  1. Which of the following is an incorrect syntax for pointer to structure?
    (Assuming struct test{int n;}*ptr_struct;)
    1. (*ptr_struct).n = 110;
    2. ptr_struct->n = 110;
    3. *ptr_struct.n = 110;
    4. Both (*ptr_struct).n = 110; and *ptr_struct.n = 110;
    5. None of these
Correct Option: C

*ptr_struct.n = 110; is an incorrect syntax for pointer to structure.



Your comments will be displayed only after manual approval.