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

Can member data be public?

1037


What is a unnitialised pointer?

1092


Write about the retrieval of n number of objects during the process of delete[]p?

1023


What is the difference between a type-specific template friend class and a general template friend class?

986


Explain rethrowing exceptions with an example?

1028


Should you pass exceptions by value or by reference?

1137


find the two largest values among the 6 numbers using control structures : do-while,for,if else,nestedif- else ,while. one or two of them.

2550


What does it mean to declare a destructor as static?

1086


Why the usage of pointers in C++ is not recommended ?

1455


What is a down cast?

1114


What is the disadvantage of using a macro?

1127


Why we use #include conio h in c++?

1054


What is std namespace in c++?

1187


How can you quickly find the number of elements stored in a static array?

1100


Explain what is oop?

1096