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
What is && in c programming?
What does printf does?
how to print electricity bill according to following charges first 100 units -1rs per unit for next 200 units-1.50 rs per unit without using conditions
write a program to display all prime numbers
Define VARIABLE?
What is the purpose of sprintf?
When can a far pointer be used?
Can you please explain the difference between malloc() and calloc() function?
What is the general form of a C program?
How can I split up a string into whitespace-separated fields?
What are the features of the c language?
Is c programming hard?
Write a program to print factorial of given number without using recursion?
Can you add pointers together? Why would you?
please explain clearly about execution of c program in detail,in which stage are the printf sacnf getting into exeecutable code