How to add two numbers with using function?
Answers were Sorted based on User's Feedback
Answer / 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 |
Answer / vinay kumar
suppose x=5 and y=10,Then
while(y!=0)
{
x++;
y--;
}
printf("the sum value is:%d
",x);
| Is This Answer Correct ? | 0 Yes | 0 No |
I heard that you have to include stdio.h before calling printf. Why?
who will call your main function in c under linux?
Why c is called free form language?
How do you define structure?
Why is c called a structured programming language?
How do you override a defined macro?
When was c language developed?
Explain why c is faster than c++?
How can we see the Expanded source code and compiled code for our source program in C?
What are the advantages of c preprocessor?
What is a good data structure to use for storing lines of text?
What are the benefits of organizational structure?