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
How do you print a string on the printer?
What are the differences between the function prototype and the function defi-nition?
Must accepts "Maestro Cards" Tax for bike should be less than 15 Total number of lanes is more than 10 Must provides monthly pass Write a method: boolean isGoodTollBridge(String[] cardsAccepted, String[] tollTax, boolean hasMonthlyPass, int numberOfLanes); String[] cardsAccepted A String array of names of card types accepted for payment of toll tax, it can be null if the toll does not accept any card String[] tollTax A String array of toll tax chart (say “Train : 300â€Â,â€ÂBullCart : 10â€Â) boolean hasMonthlyPass This parameter defines whether there is any monthly pass available or not int numberOfLanes This parameter defines the number of lanes for each side
How many types of comments are there in c++?
How does list r; differs from list r();?
How did c++ start?
what are function pointers?
What are c++ redistributables?
Which operator cannot overload?
Explain how to initialize a const data member.
Explain abstraction.
Which bit wise operator is suitable for checking whether a particular bit is on or off?
What is a sequence in c++?
What is the difference between strcpy() and strncpy()?
How can you differentiate between inheritance and implementation in c++?