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
How can you create a virtual copy constructor?
Explain the concept of dynamic allocation of memory?
Is there a sort function in c++?
What are the manipulators in c++?
Can member data be public?
Define a nested class.
What is the use of ::(scope resolution operator)?
How are Structure passing and returning implemented by the compiler?
What are the extraction and insertion operators in c++? Explain with examples.
Is nan a c++?
What is conditions when using boolean operators?
Can a list of string be stored within a two dimensional array?
How do you define/declare constants in c++?
What is the full name of logo?
What is polymorphism in c++? Explain with an example?