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

Answer Posted / pulkit dave

void main()
{
int class=28;
printf("%d",class);
}


it works...

[class] :p

Is This Answer Correct ?    18 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Why c++ is created?

745


List the merits and demerits of declaring a nested class in C++?

777


Please explain the reference variable in c++?

788


What does #define mean in c++?

900


If a base class is an adt, and it has three pure virtual functions, how many of these functions must be overridden in its derived classes?

793


What are c++ stream classes?

765


Can a constructor return a value?

861


Discuss the effects occur, after an exception thrown by a member function is unspecified by an exception specification?

818


Is c++ a good first language to learn?

752


What is enum class in c++?

920


What are the various oops concepts in c++?

783


What is atoi?

727


Explain the difference between c & c++?

790


Evaluate !(1&&1||1&&0) a) Error b) False c) True

930


Using a smart pointer can we iterate through a container?

794