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
Explain the difference between exit() and _exit() function?
Is c procedural or functional?
Is there anything like an ifdef for typedefs?
What is the return type of sizeof?
What is a built-in function in C?
What is c method?
What is identifier in c?
Write a C program to accept a matrix of any size. Find the frequency count of each element in the matrix and positions in which they appear in the matrix
By using C language input a date into it and if it is right?
write a program in C that prompts the user for today's date,tomorrow's date and display the results.Use structures for today's date,tomorrow's date and an array to hold the days for each month of the year.
What are dangling pointers? How are dangling pointers different from memory leaks?
What is the purpose of main() function?
Why header file is used in c?
Do you know null pointer?
What is the main difference between calloc () and malloc ()?