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...

difference between c and c++?

Answer Posted / radha garg

hi,
for more understanding see this program

for adding two no.

#include<stdio.h>................#include<iostream.h>
#include<conio.h> . #include<conio.h>
void main() . void main()
{ . {
int a,b,c; . int a,b;
printf("enter 2 no."); . cout<<"enter two number";
scanf("%d%d",&a,&b); . cin>>a>>b;
c=a+b; . int c=a+b;
printf("sum is=%d"c); . cout<<"sum is="<<c;
getch(); . getch
(); .
} . }

so from above we know that in c variables are declared in
above bt in case of C++ variable declaration can be
anywhere .whenever we need we declare variables

Is This Answer Correct ?    8 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the use of pointer in c++ with example?

981


Explain what are single and multiple inheritances in c++?

974


Can comments be longer than one line?

1020


How do you save a c++ program?

983


What is std :: flush?

1003


Can union be self referenced?

1069


What is an object in c++?

1147


What are the benefits of operator overloading?

1154


If you want to share several functions or variables in several files maitaining the consistency how would you share it?

928


Is there finally in c++?

1028


Is linux written in c or c++?

992


Where must the declaration of a friend function appear?

907


Are c and c++ similar?

997


What is flag in computer?

984


What is the maximum combined length of command line arguments including the space between adjacent arguments?

956