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
Can member data be public?
What is a unnitialised pointer?
Write about the retrieval of n number of objects during the process of delete[]p?
What is the difference between a type-specific template friend class and a general template friend class?
Explain rethrowing exceptions with an example?
Should you pass exceptions by value or by reference?
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.
What does it mean to declare a destructor as static?
Why the usage of pointers in C++ is not recommended ?
What is a down cast?
What is the disadvantage of using a macro?
Why we use #include conio h in c++?
What is std namespace in c++?
How can you quickly find the number of elements stored in a static array?
Explain what is oop?