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 output redirection?
Can we change the value of #define in c?
largest Of three Number using without if condition?
What is variable and explain rules to declare variable in c?
write a program that will open the file, count the number of occurences of each word in the the complete works of shakespeare. You will then tabulate this information in another file.
How can I display a percentage-done indication that updates itself in place, or show one of those twirling baton progress indicators?
What is %g in c?
List the difference between a "copy constructor" and a "assignment operator"?
What is double pointer in c?
Why do we use null pointer?
a number whose only prime factors are 2,3,5, and 7 is call humble number,,write a program to find and display the nth element in this sequence.. sample input : 2,3,4,11,12,13, and 100.. sample output : the 2nd humble number is 2,the 3rd humble number is 3,the 4th humble number is ,the 11th humble number is 12, the 12th humble number is 14, the 13th humble number is 15, the 100th humble number is 450.
Create a registration form application by taking the details like username, address, phone number, email with password and confirm password (should be same as password).Ensure that the password is of 8 characters with only numbers and alphabets. Take such details for 3 users and display the details. While taking input password must appear as “****”.
Tell us something about keyword 'auto'.
What are operators in c?
how to find binary of number?