plz answer....A program that takes 3 variables e.g a,b,c in
as seperate parameters and rotates the values stored so
that value goes a to b, b to c and c to a .

Answer Posted / ruchi

#include<stdio.h>
#include<conio.h>
int main()
{
int a,b,c,d;
printf("\nEnter the three numbers ");
scanf("%d %d %d",&a,&b,&c);
a=a+b;
b=a-b;
d=c;
c=a-b;
a=d;
printf("\nNow the values are ");
printf("%d %d %d",a,b,c);
getch();
}

Is This Answer Correct ?    1 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How do you use a pointer to a function?

625


Lists the benefits of c programming language?

587


What is a lookup table in c?

619


What are the two types of structure?

567


Write a program in "C" to calculate the root of a quadratic equation ax^2+bx+c=0, where the value of a,b & c are known.

1718






How can I do peek and poke in c?

611


Why is python slower than c?

595


Write a program with dynamically allocation of variable.

600


What are enums in c?

651


Are there namespaces in c?

561


Process by which one bit pattern in to another by bit wise operation is?

610


please give me some tips for the placement in the TCS.

1627


Why we write conio h in c?

553


Is malloc memset faster than calloc?

605


Write a factorial program using C.

637