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

Answer Posted / uma sankar pradhan

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

the above code will compile in 'c'
but in 'c++' it will give compilation error

Is This Answer Correct ?    5 Yes 6 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Which format specifier is used for printing a pointer value?

573


What is the use of lambda in c++?

571


What is the difference between cin.read() and cin.getline()?

553


Why do we use using namespace std in c++?

597


What is exception handling? Does c++ support exception handling?

585






What is the use of function pointer?

573


When must you use a pointer rather than a reference?

598


Evaulate: 22%5 a) 2 b) 4 c) 0

665


What is the most useful programming language?

602


What is the basic difference between C and C++?

620


True or false, if you keep incrementing a variable, it will become negative a) True b) False c) It depends

1853


What is the use of register keyword with the variables?

545


What are different types of loops in c++?

652


Which programming language is best to learn first?

581


Why is c++ awesome?

572