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 / likhit gatagat
#include<stdio.h>
main()
{
int a,b,c,p,q,r;
printf("Enter three numbers:\n");
Scanf("%d%d%d",&a,&b,&c);
p=a;
q=b;
r=c;
b=p;
c=q;
a=r;
printf("%d%d%d",a,b,c);
}
| Is This Answer Correct ? | 17 Yes | 8 No |
Post New Answer View All Answers
What is the hardest programming language?
write a c program to calculate sum of digits till it reduces to a single digit using recursion
What is the difference between #include and #include 'file' ?
What are reserved words?
Write a program of prime number using recursion.
What are the characteristics of arrays in c?
Is stack a keyword in c?
What is the difference between union and anonymous union?
Is null always equal to 0(zero)?
a function gets called when the function name is followed by a a) semicolon (;) b) period(.) c) ! d) none of the above
If a five digit number is input through the keyboard, write a program to print a new number by adding one to each of its digits.For example if the number that is input is 12391 then the output should be displayed as 23402
What is pragma in c?
What is the purpose of & in scanf?
Write a program to check prime number in c programming?
What is the difference between malloc calloc and realloc in c?