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 an adaptor class or wrapper class in c++?
What is pointer in c++ with example?
What is runtime polymorphism in c++?
What are the differences between the function prototype and the function defi-nition?
What is the c++ programming language used for?
Are c and c++ similar?
Which software is used for c++ programming?
How do you find out if a linked-list has an end?
What kind of problems can be solved by a namespace?
What is the last index number in an array of 100 characters a) 100 b) 99 c) 101
What are the advantages of c++ over c?
Describe the role of the c++ in the tradeoff of safety vs. Usability?
What are advantages of c++?
Explain the differences between list x; & list x();.
What are separators in c++?