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?

Answers were Sorted based on User's Feedback



How to add two numbers with using function? ..

Answer / geetha

#include<stdio.h>
#include<conio.h>
int add(int,int);
main()
{
int a,b,c;
printf("enter a,b values");
scanf("%d%d",&a,&b);
c=add(a,b);
printf("%d",c);
}
int add(int x,int y)
{
return(x+y);
}

Is This Answer Correct ?    9 Yes 0 No

How to add two numbers with using function? ..

Answer / vinay kumar

suppose x=5 and y=10,Then
while(y!=0)
{
x++;
y--;
}
printf("the sum value is:%d
",x);

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More C Interview Questions

what is the difference between north western polytechnique university and your applied colleges?? please give ur answers for this. :)

0 Answers  


What is %d called in c?

0 Answers  


a 'c' program to tell that the set of three coordinates lie on a same line

3 Answers   Persistent,


what is the purpose of the code, and is there any problem with the code? int f( int n, int l, int r ) { return (n << l) >> r; }

2 Answers   Google,


Why shouldn’t I start variable names with underscores?

0 Answers  


What are bit fields? What is their use?

2 Answers   Adobe,


Write a pro-gramme to determine whether the number is even or odd?

1 Answers  


#include<stdio.h> int main(){ int a[]={1,2,3,5,1}; int *ptr=a+4; int y=ptr-a; printf("%d",y); }

3 Answers   Zoho,


what are two categories of clint-server application development ?

1 Answers  


What is extern keyword in c?

0 Answers  


c programs are converted into machine language with the help of a) an interpreter b) a compiler c) an operatinf system d) none of the above

0 Answers  


What is bubble sort technique in c?

0 Answers  


Categories