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

Do you know what are the new features that iso/ansi c++ has added to original c++ specifications?

758


What is new in c++?

837


How is new() different from malloc()?

827


Can you overload the operator+ for short integers?

782


How are pointers type-cast?

844






What is vector pair in c++?

917


What does it mean to declare a member function as static?

794


What are keywords in c++?

812


How do you find out if a linked-list has an end?

834


What is the difference between C and CPP?

816


What do you understand by a pure virtual member function?

751


What is the difference between an external iterator and an internal iterator?

829


What doescout<<(0==0) print out a) 0 b) 1 c) Compiler error: Lvalue required

763


What is auto type c++?

831


Where Malloc(), Calloc(), and realloc() does get memory?

794