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 use of header files?
Tell me about low level programming languages.
Can we use any name in place of argv and argc as command line arguments?
Describe explain how arrays can be passed to a user defined function
Explain the properties of union.
What are extern variables in c?
Why do some versions of toupper act strangely if given an upper-case letter?
When should structures be passed by values or by references?
What is a stream?
FILE *fp1,*fp2; fp1=fopen("one","w") fp2=fopen("one","w") fputc('A',fp1) fputc('B',fp2) fclose(fp1) fclose(fp2)} a.error b. c. d.
How do you determine whether to use a stream function or a low-level function?
A function can make the value of a variable available to another by a) declaring the variable as global variable b) Passing the variable as a parameter to the second function c) Either of the two methods in (A) and (B) d) binary stream
Describe the order of precedence with regards to operators in C.
How can I remove the trailing spaces from a string?
What is static and auto variables in c?