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
When the macros gets expanded?
What are the 4 data types?
a single linked list consists of nodes a to z .print the nodes in reverse order from z to a using recursion
What is the code in while loop that returns the output of given code?
A collection of functions,calls,subroutines or other data a) library b) header files c) set of files d) textfiles
What is the difference between %d and %i?
What is string in c language?
What is a pointer on a pointer in c programming language?
The statement, int(*x[]) () what does in indicate?
What happens if header file is included twice?
Why do we use null pointer?
What is the explanation for prototype function in c?
What is the right type to use for boolean values in c? Is there a standard type?
‘SAVEPOINT’ and ‘ROLLBACK’ is used in oracle database to secure the data comment. Give suitable examples of each with sql command.
How can I recover the file name given an open stream?