Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

What are the various storage classes in C++?

1188


Explain the difference between static and dynamic binding of functions?

1122


Write about an iterator class?

1133


What is function overloading c++?

1135


What is virtual destructor? What is its use?

1122


When there is a global variable and local variable with the same name, how will you access the global variable?

1159


What is an iterator?

1241


What is meant by entry controlled loop?

1181


What is the advantage of c++ over c?

1085


Differentiate between a constructor and a method in C++.

1119


Can you pass a vector to a function?

1032


What is c++ namespace?

1258


What is the difference between the functions memmove() and memcpy()?

1169


What is a responder chain?

1114


Can a constructor be private?

1121