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 are the advantage of c language?
without a terminator how can we print a message in a printf () function.
Predict the output or error(s) for the following: 25. main() { printf("%p",main); }
what is the difference between structural,object based,object orientd programming languages?
Explain output of printf("Hello World"-'A'+'B'); ?
How to write the code of the program to swap two numbers with in one statement?
What is the difference between specifying a constant variable like with constant keyword and #define it? i.e what is the difference between CONSTANT FLOAT A=1.25 and #define A 1.25
Can include files be nested?
main() { int x=10,y=15; x=x++; y=++y; printf("%d %d\n",x,y); } output??
19 Answers EBS, Ramco, Sangwin, TCS,
program for following output using for loop? 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5
#include show(int t,va_list ptr1) { int a,x,i; a=va_arg(ptr1,int) printf(" %d",a) } display(char) { int x; listptr; va_star(otr,s); n=va_arg(ptr,int); show(x,ptr); } main() { display("hello",4,12,13,14,44); }
How do you determine a file’s attributes?