What is the difference between "C structure" and "C++ structure".

This question is related to TCS Interview

Showing Answers 1 - 9 of 9 Answers

tanuja

  • Nov 30th, 2010
 

C structure:::
1) //single line comment about the programme.
2) headerfiles
3) macros, typedef...
4) global declarations
5) main()
6) statements


C++ Structure:::
1) /*multi line comments*/
2) headerfiles
3) typedef, inline functions
4) global variables.
5) class starts
6) acces specifiers
7) statements.....
8) class ends with an ;
9) main starts
10) statements.
11) main ends


  Was this answer useful?  Yes

c++ also support structure bt with more additional features making it suitable for oop dat feature is class. 

like in c++ enum defined within class/structure is local to dat class while in c it is globally visible

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions