Which of the following syntax for declaring a variable of struct STRUCT can be used in both C and C++?

a) struct STRUCT S;
b) STRUCT S;
c) Both struct STRUCT S; and STRUCT S;
d) Both C and C++ have different syntax

1 thought on “Which of the following syntax for declaring a variable of struct STRUCT can be used in both C and C++?”

  1. a
    Explanation: C program requires struct keyword while defining a variable of any structure, therefore, we cannot use the second STRUCT S; definition to declare a variable.

Leave a Comment