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
What is a class template?
Is java a c++?
What is the full form of dos?
How c functions prevents rework and therefore saves the programers time as wel as length of the code ?
Am pass the 10000 records to target in target I will take commit interval 15000 when I was stop the work flow what will happened
What are c++ templates used for?
Why ctype h is used in c++?
Is dev c++ a good compiler?
When does a name clash occur in c++?
What is the best c++ compiler?
Why c++ is better than c language?
How can we access protected and private members of a class?
Define a constructor?
What is capacity in vector in c++?
What is vectorial capacity?