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
What is the total generic pointer type?
What is use of bit field?
Find duplicates in a file containing 6 digit number (like uid) in O (n) time.
What is the difference between new and malloc functions?
Tell me with an example the self-referential structure?
Explain what are its uses in c programming?
What is a nested formula?
What are the advantages of using new operator as compared to the function malloc ()?
What is extern storage class in c?
Explain the process of converting a Tree into a Binary Tree.
Write a program to reverse a given number in c?
Differentiate call by value and call by reference?
In c programming language, how many parameters can be passed to a function ?
How do you view the path?
Explain how do you determine whether to use a stream function or a low-level function?