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 the best c++ book?
What is a friend function in c++?
What are pointers, when declared, intialized to a) NULL b) Newly allocated memory c) Nothing. Its random
What is endl c++?
How to get the current position of the file pointer?
What is the use of class in c++?
Explain the benefits of proper inheritance.
Difference between overloading vs. Overriding
Explain static and dynamic memory allocation with an example each.
Explain the difference between class and struct in c++?
Is recursion allowed in inline functions?
What is the full form of india?
What is the difference between C and CPP?
How important is c++?
How do I write a c++ program?