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

How do you establish a has-a relationship?

1046


Write a function to find the nth item from the end of a linked list in a single pass.

929


Can member functions be private?

964


What is the last index number in an array of 100 characters a) 100 b) 99 c) 101

1098


What is the difference between *p++ and (*p)++ ?

1300


What is the maximum combined length of command line arguments including the space between adjacent arguments?

961


What is a memory leak c++?

1073


What are the operators in c++?

1066


Explain public, protected, private in c++?

966


What is ctime c++?

1068


Can I uninstall microsoft c++ redistributable?

1055


What is format for defining a structure?

1041


What is a map in c++?

1112


How many static variables are created if you put one static member into a template class definition?

984


what is the difference between overloading & overriding? give example.

1111