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
What is volatile c?
What is wild pointer in c?
What are the various types of control structures in programming?
What is spaghetti programming?
When should the const modifier be used?
Is malloc memset faster than calloc?
Do you know what are the properties of union in c?
What are the advantages of using new operator as compared to the function malloc ()?
How can I invoke another program or command and trap its output?
What is function prototype in c with example?
which type of aspect you want from the student.
Explain what are the standard predefined macros?
What does main () mean in c?
What does %c mean in c?
What do you mean by invalid pointer arithmetic?