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 dynamic and static typing?
What are structures and unions?
Which is not a valid keyword a) public b) protected c) guarded
Is c++ a high level language?
How is static data member similar to a global variable?
What kind of jobs can I get with c++?
Define a pdb file.
Define macro.
What it is and how it might be called (2 methods).
What are the various access specifiers in c++?
write a porgram in c++ that reads an integer and print the biggest digit in the number
What is the object serialization?
Explain pass by value and pass by reference.
Why ctype h is used in c++?
Difference between inline functions and macros?