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 private public protected in c++?
Why was c++ created?
What are pointers used for c++?
Explain the scope of resolution operator.
What is prototype for that c string function?
What is a terminating character in c++?
Write about an iterator class?
Define namespace in c++?
How is data hiding achieved in c++?
What is low level language in simple words?
What is the use of lambda in c++?
Give an example of run-time polymorphism/virtual functions.
What is the use of endl in c++ give an example?
What is a far pointer? where we use it?
Who invented turbo c++?