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
Which bitwise operator is used to check whether a particular bit is on or off?
write a porgram in c++ that reads an integer and print the biggest digit in the number
What is dev c++ used for?
What is stoi in c++?
What is new in c++?
Does improper inheritance have a potential to wreck a project?
What is an object in c++?
what is C++ objects?
Differences between private, protected and public and give examples.
Explain overriding.
Explain the difference between static and dynamic binding of functions?
How does class accomplish data hiding in c++?
What are shallow and deep copies?
What are the uses of pointers?
Why would you use pointers in c++?