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
Does c++ have arraylist?
When should you use global variables?
Explain the concept of friend function in c++?
What is an iterator class in c++?
How do I make turbo c++ full screen?
Using a smart pointer can we iterate through a container?
Define anonymous class.
Is string data type in c++?
what is the difference between overloading & overriding? give example.
What is the use of map in c++?
When should we use multiple inheritance?
In which situation the program terminates before reaching the breakpoint set by the user at the beginning of the mainq method?
Which operator cannot overload?
Is c++ an oop?
Write a struct time where integer m, h, s are its members?