Write any small program that will compile in "C" but not in
"C++"?

Answer Posted / sathish kumar

Hi All,

U can write many programs which will compile in C and not
in C++. Sample program.

const i; /* this is possible in C but not in C++ */
const int i; // it should be done like this in C++.


Thanks & Regards
Sathish Kumar

Is This Answer Correct ?    10 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What does new do in c++?

820


Are vectors passed by reference c++?

720


Explain how functions are classified in C++ ?

987


Is c++ the best programming language?

745


What are the important differences between c++ and java?

832


Why is c++ called oops?

792


What are the characteristics of friend functions?

760


What are the general quetions are in DEna bank manager IT/System interviews?

1775


What happens if a pointer is deleted twice?

1027


Differentiate between an array and a list?

927


What does new in c++ do?

740


What information can an exception contain?

896


How does java differ from c and c++?

726


What is an adaptor class or wrapper class in c++?

800


What are the c++ access specifiers?

1056