why c++ is not called strictly d super set of c?
Answer Posted / astha biswas
there are some key-words like class , new etc which can be
used as identifiers in c. so if we save program in .c using,
new as an identifier, it will not show any error; but if we
save the same program in .cpp, it will show error as new is
an operator in c++.
EX:
#include<stdio.h>
#include<conio.h>
void main()
{
int new;
clrscr();
new=3;
printf("%d",new);
}
if we execute this program in .c, output will be 3.
but if we execute this program in .cpp; then it will show 2
errors.
1. declaration terminated incorrectly.
2. lvalue required.
| Is This Answer Correct ? | 10 Yes | 1 No |
Post New Answer View All Answers
To which numbering system can the binary number 1101100100111100 be easily converted to?
A mXn matrix is given and rows and column are sorted as shown below.Write a function that search a desired entered no in the matrix .with minimum complexity 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
Why is c++ so fast?
What can I safely assume about the initial values of variables which are not explicitly initialized?
What are the advantages of c++?
What is pointer in c++ with example?
What would happen on forgetting [], while deallocating an array through new?
What is an adjust field format flag?
What are the advantages of using friend classes?
What is the best c++ book for beginners?
What is lambda expression c++?
What is else syntax in c++?
What is a class definition?
What is oops in c++?
What is iterator in c++?