Write any small program that will compile in "C" but not
in "C++"
Answer Posted / tareq
<code>
int class;
</code>
$gcc a.c -c; echo $?
0
$g++ a.c -c; echo $?
a.c:1: error: expected identifier before ';' token
a.c:1: error: multiple types in one declaration
a.c:1: error: declaration does not declare anything
1
| Is This Answer Correct ? | 1 Yes | 6 No |
Post New Answer View All Answers
What is a modifier in c++?
What is the oldest programming language?
What is std :: flush?
What is iomanip c++?
Does c++ have string data type?
How does list r; differs from list r();?
What is DlgProc?
What are the various storage classes in C++?
What is a binary file? List the merits and demerits of the binary file usagein C++.
What does it mean to declare a member function as static?
What are associate containers?
List the special characteristics of constructor.
Do the parentheses after the type name make a difference with new?
What is a vector c++?
What is helper in c++?