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
Can stdout be forced to print somewhere other than the screen?
How can I get back to the interactive keyboard if stdin is redirected?
What is the difference between variable declaration and variable definition in c?
Explain how can type-insensitive macros be created?
What does %c do in c?
if p is a string contained in a string?
Explain logical errors? Compare with syntax errors.
How is a null pointer different from a dangling pointer?
What is auto keyword in c?
What is enumerated data type in c?
Is there any demerits of using pointer?
What is the translation phases used in c language?
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
#include
Is using exit() the same as using return?