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 are the various storage classes in C++?
Explain the difference between static and dynamic binding of functions?
Write about an iterator class?
What is function overloading c++?
What is virtual destructor? What is its use?
When there is a global variable and local variable with the same name, how will you access the global variable?
What is an iterator?
What is meant by entry controlled loop?
What is the advantage of c++ over c?
Differentiate between a constructor and a method in C++.
Can you pass a vector to a function?
What is c++ namespace?
What is the difference between the functions memmove() and memcpy()?
What is a responder chain?
Can a constructor be private?