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
Is c++ pass by reference or value?
Is c++ double?
What is the main purpose of overloading operators?
Explain the difference between using macro and inline functions?
What are the different types of comments allowed in c++?
What happens if a pointer is deleted twice?
Inline parameters : What does the compiler do with the parameters of inline function, that can be evaluated in runtime ?
What is ios :: in in c++?
Does c++ have arraylist?
What is a local variable?
What is set in c++?
How do you declare a set in c++?
What is ostream in c++?
Write a function to find the nth item from the end of a linked list in a single pass.
What is ios in c++?