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
Why is polymorphism useful?
Which software is used to run c++ program?
How does a C++ structure differ from a C++ class?
Explain the use of this pointer?
What is the purpose of the "delete" operator?
How a new operator differs from the operator new?
Explain terminate() and unexpected() function?
How is new() different from malloc()?
What jobs can you get with a c++ certification?
How a modifier is similar to mutator?
Define pre-condition and post-condition to a member function in c++?
Is string data type in c++?
What is a pointer how and when is it used?
What is a breakpoint?
What is the use of endl in c++?