How to add two numbers with using function?

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is pointers in c?

642


Is malloc memset faster than calloc?

605


What is the difference between functions abs() and fabs()?

641


Differentiate abs() function from fabs() function.

588


find out largest elemant of diagonalmatrix

1643






What are the rules for identifiers in c?

579


What is a char c?

586


how to find anagram without using string functions using only loops in c programming

2710


What does printf does?

734


Given only putchar (no sprintf, itoa, etc.) write a routine putlong that prints out an unsigned long in decimal. [ I gave the obvious solution of taking % 10 and / 10, which gives us the decimal value in reverse order. This requires an array since we need to print it out in the correct order. The interviewer wasn't too pleased and asked me to give a solution which didn't need the array ].

634


Can 'this' pointer by used in the constructor?

608


What is difference between && and & in c?

576


Why do we use stdio h and conio h?

628


What is volatile keyword in c?

577


Explain what is the advantage of a random access file?

652