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 / anandi

#include<stdio.h>
#include<conio.h>
void main()
{
int add(int,int);
int a,b;
clrscr();
printf("Enter two numbers: ");
scanf("%d %d",&a,&b);
printf("The Sum is: %d",add(a,b));
getch();
}
int add(int x,int y)
{
return(x+y);
}

Is This Answer Correct ?    42 Yes 14 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

which of the following shows the correct hierarchy of arithmetic operations in C a) (), **, * or/,+ or - b) (),**,*,/,+,- c) (),**,/,*,+,- d) (),/ or *,- or +

1691


A variable that is defined in a specified portion of a program but can be used throughout the program a) global variable b) local variable c) character d) none

1166


write a program using linked list in which each node consists of following information. Name[30] Branch Rollno Telephone no i) Write the program to add information of students in linked list

2756


What is the use of volatile?

1055


What are unions in c?

991


How do you construct an increment statement or decrement statement in C?

1189


What is a string?

1063


What is calloc() function?

1060


What is openmp in c?

980


void main(int n) { if(n==0) return; main(--n); printf("%d ",n); getch(); } how it work and what will be its output...............it any one know ans plz reply

2719


How do you generate random numbers in C?

1162


What is the basic structure of c?

1028


What is sizeof array in c?

1001


Where are local variables stored in c?

996


What is the advantage of an array over individual variables?

1198