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
Is dev c++ free?
What do you mean by delegate? Can a user retain delegates?
Explain 'this' pointer and what would happen if a pointer is deleted twice?
What is the use of pointer in c++ with example?
What is lambda expression c++?
Write a C++ Program to check whether a number is prime number or not?
How much do coding jobs pay?
What is encapsulation in c++?
What is class in c++ with example?
Who created c++?
Explain stack unwinding.
Explain static and dynamic memory allocation with an example each.
What is purpose of new operator?
Why c++ is the best language?
What is the benefit of encapsulation?