plz answer....A program that takes 3 variables e.g a,b,c in
as seperate parameters and rotates the values stored so
that value goes a to b, b to c and c to a .
Answer Posted / ruchi
#include<stdio.h>
#include<conio.h>
int main()
{
int a,b,c,d;
printf("\nEnter the three numbers ");
scanf("%d %d %d",&a,&b,&c);
a=a+b;
b=a-b;
d=c;
c=a-b;
a=d;
printf("\nNow the values are ");
printf("%d %d %d",a,b,c);
getch();
}
| Is This Answer Correct ? | 1 Yes | 2 No |
Post New Answer View All Answers
What is the difference between %d and %i?
Can you please explain the scope of static variables?
Explain what would happen to x in this expression: x += 15; (assuming the value of x is 5)
What is auto keyword in c?
Explain a file operation in C with an example.
What is function prototype in c with example?
Do you know what are bitwise shift operators in c programming?
Is c is a procedural language?
GIven a sequence of characters. How will you convert the lower case characters to upper case characters. ( Try using bit vector - sol given in the C lib -> typec.h)
How do you initialize pointer variables?
why use "return" statement a) on executing the return statement it immediately transfers the control back to the calling program b) it returns the value present in the parentheses return, to the calling program c) a & b d) none of the above
What are actual arguments?
What are the ways to a null pointer can use in c programming language?
we called a function and passed something do it we have always passed the "values" of variables to the called function. such functions calles are called a) calls by reference b) calls by value c) calls by zero d) none of the above
Write a program to print factorial of given number using recursion?