Write a program that takes three variables(a,b,c) in as
separate parameters and rotates the values stored so that
value a goes to b,b,to c and c to a
Answer Posted / rajesh bhansali
#include<stdio.h>
main()
{
int x, y, z, a;
printf("Type values of x, y and z\n");
scanf("%d %d %d",&x,&y,&z);
printf("On rotation we found the following values
assigned to x,y,z.\n");
a=z;
z=x;
x=y;
y=a;
printf("x=%d, y=%d, z=%d", x,y,z);
getch();
}
| Is This Answer Correct ? | 62 Yes | 12 No |
Post New Answer View All Answers
difference between Low, Middle, High Level languages in c ?
How arrays can be passed to a user defined function
How can you call a function, given its name as a string?
What is the use of a static variable in c?
Difference between exit() and _exit() function?
Write a program to print all permutations of a given string.
What is a program?
ATM machine and railway reservation class/object diagram
What are the different types of data structures in c?
How are strings stored in c?
What is the purpose of 'register' keyword in c language?
How does struct work in c?
Explain how do you print an address?
What is the difference between a function and a method in c?
How can you allocate arrays or structures bigger than 64K?