Write any small program that will compile in "C" but not
in "C++"
Answer Posted / karunesh
int GetNum()
{
printf("this will compile under c but not in c++");
}
you will get a error under g++ funtion should return int
while in c i will work with warning.
Is This Answer Correct ? | 0 Yes | 3 No |
Post New Answer View All Answers
What is #include math h in c++?
what Is DCS ? what i will get benefit when i did?
What is the difference between delegation and implemented-in-terms-of?
What is struct c++?
Name the operators that cannot be overloaded in C++?
what is c++
Inline parameters : What does the compiler do with the parameters of inline function, that can be evaluated in runtime ?
the first character in the variable name must be an a) special symbol b) number c) alphabet
Why c++ is created?
Explain method of creating object in C++ ?
Why namespace is used in c++?
Is string an object in c++?
What does flush do c++?
What does namespace mean in c++?
Explain container class.