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

What is setbase c++?

1052


Differentiate between a copy constructor and an overloaded assignment operator.

1018


What is pointer -to-members in C++? Give their syntax?

984


What is expression parser in c++

2414


Can we sort map in c++?

966


Is c++ built on c?

970


Does c++ cost money?

951


What is a c++ map?

1297


Define stacks. Provide an example where they are useful.

950


What are the defining traits of an object-oriented language?

1137


Write a recursive program to calculate factorial in c++.

1025


What is c++ prototype?

1080


What is the difference between cin.read() and cin.getline()?

1016


Do you know the use of vtable?

1085


What is the auto keyword good for in c++?

1118