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 |
what is the maximum limit of row and column of a matrix in c programming. in linux .
What are function pointers? Provide an example.
IS it possible to define a zero sized array in c.if it is possible how can the elements of that array can be accessed.array index starts from zero,if it is possible to define zero sized array how can be its first element can be accesseed.
How can you find the day of the week given the date?
what is difference between #include<stdio.h> and #include"stdio.h"
What is extern keyword in c?
swapping of two numbers without using third variable using AND and OR operators
what would be the output of the following prog? Justify your answer? main() { unsigned char ch; unsigned char i; ch = -255; printf("%d",ch); i = -1; printf("%d",i); }
Is it possible to run using programming C for Java Application?
Reverse the part of the number which is present from position i to j. Print the new number.[without using the array] eg: num=789876 i=2 j=5 778986
What are the advantages and disadvantages of pointers?
Why & is used in scanf in c?