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 do you mean by persistent and non persistent objects?

1441


What is a c++ object?

1184


Where and why do I have to put the "template" and "typename" keywords?

1054


What is a template in c++?

1862


What is the this pointer?

1128


Comment on assignment operator in c++.

1123


What is null and void pointer?

1072


What is protected inheritance?

1055


What is the difference between equal to (==) and assignment operator (=)?

1081


How can you specify a class in C++?

1295


Who created c++?

1070


What are references in c++? What is a local reference?

1050


Can class objects be passed as function arguments?

1075


What is prototype for that c string function?

1148


What are destructors?

1020