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 .
Answers were Sorted based on User's Feedback
Answer / venkatesh sabinkar
void main()
{
int a,b,c,t;
clrscr();
printf("enter the values of a, b and c");
scanf("%d%d%d",&a,&b,&c);
t=a;
a=b;
b=c;
c=t;
printf("a=%d,b=%d,c=%d",a,b,c);
getch();
}
Is This Answer Correct ? | 9 Yes | 7 No |
Answer / swapnil chhajer
#include<stdio.h>
int main()
{
int a,b,c;
printf("Enter three numbers : ");
scanf("%d %d %d",&a,&b,&c);
a = a+b+c;
b = a-b-c;
c = a-b-c;
a = a-b-c;
printf("a : %d b: %d c: %d",a,b,c);
fflush(stdin);
getchar();
}
Is This Answer Correct ? | 6 Yes | 6 No |
Answer / 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 |
Can we add pointers together?
What tq means in chat?
What is #include called?
How do you write a program which produces its own source code as its output?
What are the two forms of #include directive?
What is an anonymous union and where to apply that ?
What are disadvantages of C language.
Why do we use null pointer?
Write a program to show the change in position of a cursor using c
is c language is a object oreinted language?
how memory store byte
How to reverse a linked list
1 Answers Aricent, Fidelity, IBM, TCS,