How to add two numbers with using function?
Answer Posted / 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 |
Post New Answer View All Answers
Are local variables initialized to zero by default in c?
What is the use of a ‘’ character?
What do you mean by command line argument?
Simplify the program segment if X = B then C ← true else C ← false
p*=(++q)++*--p when p=q=1 while(q<=6)
How can I determine whether a machines byte order is big-endian or little-endian?
Explain what math functions are available for integers? For floating point?
What is the difference between fread and fwrite function?
How can I write functions that take a variable number of arguments?
What is formal argument?
find the output? void r(int a[],int c, int n) { if(c>n) { a[c]=a[c]+c; r(a,++c,n); r(a,++c,n); } } int main() { int i,a[5]={0}; r(a,0,5); for(i=0;i<5;i++) printf("\n %d",a[i]); getch(); }
A text file that contains declarations used by a group of functions,programs,or users a) executable file b) header file c) obj file d) .cfile
What is sizeof int in c?
show how link list can be used to repersent the following polynomial i) 5x+2
What is the purpose of the statement: strcat (S2, S1)?