Write any small program that will compile in "C" but not
in "C++"

Answer Posted / uma sankar pradhan

xyz()
{
printf("very good");
}

the above code will compile in 'c'
but in 'c++' it will give compilation error

Is This Answer Correct ?    5 Yes 6 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

When the constructor of a base class calls a virtual function, why doesn't the override function of the derived class gets called?

579


What do you mean by function overriding & function overloading in c++?

605


What is a singleton c++?

552


Is map thread safe c++?

636


how to connect with oracle 9i with server in socket program in c/c++

1853






Can the creation of operator** is allowed to perform the to-the-power-of operations?

582


What do you mean by translation unit?

607


A mXn matrix is given and rows and column are sorted as shown below.Write a function that search a desired entered no in the matrix .with minimum complexity 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16

3244


What is the main purpose of overloading operators?

592


Write a Program to find the largest of 4 no using macros.

584


How are the features of c++ different from c?

597


Will c++ be replaced?

556


Explain deep copy?

613


What does return 0 do in c++?

581


Define a nested class. Explain how it can be useful.

640