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
What is a c++ object?
What are c++ templates used for?
What is ifstream c++?
What are the extraction and insertion operators in c++? Explain with examples.
Explain what is class definition in c++ ?
Where Malloc(), Calloc(), and realloc() does get memory?
What is a breakpoint?
What is the difference between a reference and a pointer?
Explain the register storage classes in c++.
Write a program in c++ to print the numbers from n to n2 except 5 and its multiples
Which is best c++ or java?
Why use of template is better than a base class?
Should I learn c++ c?
why is c++ called oops? Explain
What are the three forms of cin.get() and what are their differences?