Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

What are all predefined data types in c++?

1173


Can java be faster than c++?

1205


What is a multiset c++?

1212


Differentiate between a copy constructor and an overloaded assignment operator.

1143


What are guid?

1309


What does the following do: for(;;) ; a) Illegal b) Loops forever c) Ignored by compiler...not illegal

1218


What is a base class?

1180


What is a local variable?

1134


Describe private, protected and public – the differences and give examples.

1269


What is the disadvantage of using a macro?

1182


What is an adjust field format flag?

1188


How would you differentiate between a pre and post increment operators while overloading?

1201


What is virtual base class?

1134


What is a storage class?

1378


What character terminates all character array strings a) b) . c) END

1360