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

How to add two numbers with using function?

Answer Posted / balaji

/*this program is used to add two numbers using functions */
#include<stdio.h>
#include<conio.h>
void add(int,int);
void main()
{
int x,y;
printf("enter the two digits/numbers which you want to add");
scanf("%d%d",&x,&y);
add(x,y);
getch();
}
void add(int a,int b)
{
int c;
c=a+b;
printf("the sum of %d and %d is %d",a,b,c);
}

Is This Answer Correct ?    5 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can stdout be forced to print somewhere other than the screen?

1049


How can I get back to the interactive keyboard if stdin is redirected?

1191


What is the difference between variable declaration and variable definition in c?

1060


Explain how can type-insensitive macros be created?

999


What does %c do in c?

994


if p is a string contained in a string?

1851


Explain logical errors? Compare with syntax errors.

1072


How is a null pointer different from a dangling pointer?

1034


What is auto keyword in c?

1208


What is enumerated data type in c?

1085


Is there any demerits of using pointer?

1075


What is the translation phases used in c language?

1124


please can any one suggest me best useful video tutorials on c i am science graduate.please help me.u can email me to sas29@in.com

1777


#include int main(){ int i=10; int *ptr=&i; *ptr=(int *)20; printf("%d",i); return 0; } Output: 20 can anyone explain how came the output is 20

1724


Is using exit() the same as using return?

1362