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 / nitin
void main()
{
int a,b,c;
printf("enter the values of a,b &c");
scanf("%d%d%d",&a,&b,&c);
c=c+a;
a=c-a;
c=c+b;
b=c-b;
c=c-b;
printf("\n values of ab & c are=%d%d%d",a,b,c);
getch();
}
| Is This Answer Correct ? | 5 Yes | 3 No |
Post New Answer View All Answers
What are pointers? What are different types of pointers?
Can we declare variable anywhere in c?
What is the difference between malloc calloc and realloc in c?
What is the main difference between calloc () and malloc ()?
program to find out date after adding 31 days to a date in the month of febraury also consider the leap year
What is calloc malloc realloc in c?
please explain clearly about execution of c program in detail,in which stage are the printf sacnf getting into exeecutable code
What does nil mean in c?
What is the purpose of scanf() and printf() functions?
What is s or c?
Which is best book for data structures in c?
how can i write a program that prints out a box such that whenever i press any key8(coordinate number) on the keyboard, the box moves.
Write a programme using structure that create a record of students. The user allow to add a record and delete a record and also show the records in ascending order.
how to write optimum code to divide a 50 digit number with a 25 digit number??
What is malloc return c?