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
Define the scope of static variables.
What is calloc malloc realloc in c?
Explain threaded binary trees?
Is c dynamically typed?
How can I invoke another program (a standalone executable, or an operating system command) from within a c program?
What is nested structure with example?
Hi how many types of software editions are there and their difference (like home editions, enterprise, standard etc) can u please help me
What are the differences between Structures and Arrays?
What is the difference between strcpy() and memcpy() function in c programming?
Can the curly brackets { } be used to enclose a single line of code?
How can you find the exact size of a data type in c?
How can you increase the allowable number of simultaneously open files?
What do you mean by recursion in c?
Which node is more powerful and can handle local information processing or graphics processing?
What are identifiers and keywords in c?