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 incomplete type in c++?
Differentiate between declaration and definition.
Can a function take variable length arguments, if yes, how?
Can we use pointers in c++?
Can you be bale to identify between straight- through and cross- over cable wiring? And in what case do you use straight- through and cross-over?
What are the unique features of C++.
what are the events occur in intr activated on interrupt vector table
What is the difference between the indirection operator and the address of oper-ator?
Is linux written in c or c++?
What is flush c++?
What are separators in c++?
Which software is best for c++ programming?
Can a new be used in place of old mallocq? If yes, why?
What are multiple inheritances (virtual inheritance)? What are its advantages and disadvantages?
What are the 3 levels of programming languages?