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 abstraction in c++ with example?
Write a program for Divide a number with 2 and Print the output ( NOTE: Check for divide by zero error).
Is c++ primer good for beginners?
What is the identity function in c++? How is it useful?
write a function signature with various number of parameters.
What is the arrow operator in c++?
What is the latest c++ standard?
Can class objects be passed as function arguments?
What is a c++ vector?
How much do c++ programmers make?
Is c++ a difficult language?
How many static variables are created if you put one static member into a template class definition?
What is a hash function c++?
Is main a class in c++?
How is objective c different from c++?