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 / balasubramani

main()
{
char a;
printf("string:");
scanf("%s",a);
getch();
}

this is correct if v compile in c
but it results in error when u code xactly the same in cpp
bcoz cpp needs cout n cin instead of printf n scanf :D lol

Is This Answer Correct ?    2 Yes 6 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Does c++ have arraylist?

1013


When should you use global variables?

1208


Explain the concept of friend function in c++?

1101


What is an iterator class in c++?

1132


How do I make turbo c++ full screen?

1067


Using a smart pointer can we iterate through a container?

1071


Define anonymous class.

1066


Is string data type in c++?

1027


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

1173


What is the use of map in c++?

1140


When should we use multiple inheritance?

1038


In which situation the program terminates before reaching the breakpoint set by the user at the beginning of the mainq method?

1066


Which operator cannot overload?

1040


Is c++ an oop?

1085


Write a struct time where integer m, h, s are its members?

951