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

Answer Posted / aravind

xyz()
{
printf("very good");
}

this is correct and if u add getch();
in main then there is no chance of compilation in CPP for sure

Is This Answer Correct ?    3 Yes 11 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the outcome of cout< a) 16 b) 17 c) 16.5

631


what is data encapsulation in C++?

618


what is a class? Explain with an example.

629


Do you know what are pure virtual functions?

646


Explain what are single and multiple inheritances in c++?

565






What are manipulators in c++ with example?

597


When we use Abstract Class and when we use Interface?where we will implement in real time?

1676


What is stream and its types in c++?

568


What is class and structure in c++?

565


What is a pointer how and when is it used?

584


What does extern mean in a function declaration in c++?

710


What is a c++ vector?

608


What kind of problems can be solved by a namespace?

601


In c++, what is the difference between method overloading and method overriding?

609


Difference between pass by value and pass by reference?

616