adplus-dvertising
frame-decoration

Question

Which of the following are incorrect syntax for pointer to structure?
    (Assuming struct temp{int b;}*my_struct;)

a.

*my_struct.b = 10;

b.

(*my_struct).b = 10;

c.

my_struct->b = 10;

d.

Both *my_struct.b = 10; and (*my_struct).b = 10;

Answer: (a).*my_struct.b = 10;

Engage with the Community - Add Your Comment

Confused About the Answer? Ask for Details Here.

Know the Explanation? Add it Here.

Q. Which of the following are incorrect syntax for pointer to structure?