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 are the advantages and disadvantages of a heap?
What are the different types of pointers used in c language?
What are derived data types in c?
What is c token?
What are the various types of control structures in programming?
Write a program to print fibonacci series using recursion?
what is recursion in C
Do you know what are bitwise shift operators in c programming?
1.int a=10; 2.int b=20; 3. //write here 4.b=30; Write code at line 3 so that when the value of b is changed variable a should automatically change with same value as b. 5.
What is the use of in c?
Differentiate between null and void pointers.
Is a house a shell structure?
disply the following menu 1.Disply 2.Copy 3.Append; as per the menu do the file operations 4.Exit
How are portions of a program disabled in demo versions?
What is C language ?