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 software cycle? What is a mission critical system ? What is the important aspect of a real-time system ? Explain the difference between microkernel and macro kernel. Give an example of microkernel.Why paging is used ? Which is the best page replacement algo and Why ? What is software life cycle ? How much time is spent usually in each phases and why Which one do U want to work if selected in Honeywell ? Which are the different types of testing ? What is a distributed system ? Some questions about CSP. Which languages do U know ? What are the differences between Pascal and C. questions from Compiler construction and Lisp. Which are the different computer architecture? What is the requirement in MIMD ? What is the difference between RISC and CISC processors ? Difference between loosely coupled and tightly coupled systems ? What is an open system?
What is doubly linked list in c++?
What are keywords in c++?
List different attributes in C++?
What do you mean by early binding?
Can we use clrscr in c++?
What is anonymous object in c++?
What are the 3 levels of programming languages?
Is recursion allowed in inline functions?
Define what is constructor?
What is the main purpose of overloading operators?
What are the different types of polymorphism in c++?
Do we have to use initialization list in spite of the assignment in constructors?
Why Pointers are not used in C++?
What is the rule of three?