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 |
What is call by value in c?
Write a program that takes a 5 digit number and calculates 2 power that number and prints it(should not use big integers and exponential functions)
2 Answers HCL, IBM, Satyam, Vimal, Vimukti Technologies,
What is infinite loop?
output for following code??? main() { int x=2,y,z; x*=3+2; printf("1.%d\n",x); x*=y=z=4; printf("2.%d %d %d\n",x,y,z); x=y==z; printf("3.%d\n",x); x==(y=z); printf("%d",x); }
C program to find frequency of each character in a text file?
How will you delete a node in DLL?
What is the use of keyword VOLATILE in C?
what is the size of an integer variable?
Did c have any year 2000 problems?
What does #pragma once mean?
Write a program to give following output..... ********* **** **** *** *** ** ** * * ** ** *** *** **** **** *********
given post order,in order construct the corresponding binary tree