InterviewSolution
Saved Bookmarks
| 1. |
Which of the following is correct?(a) struct tag is required in both C and C++ while declaring an object of the structure(b) struct is not required in C but required in C++ while declaring an object of the structure(c) struct is not required in C++ but required in C while declaring an object of the structure(d) struct tag is not required in both C and C++ while declaring an object of the structureThe question was asked during an internship interview.I'm obligated to ask this question of C++ Concepts in chapter Basics Concepts of C++ of C++ |
|
Answer» CORRECT answer is (c) STRUCT is not required in C++ but required in C while declaring an OBJECT of the structure For explanation: C++ does not require struct keyword while declaring an object of the structure whereas in C we require struct TAG for declaring an object. |
|