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



plz answer....A program that takes 3 variables e.g a,b,c in as seperate parameters and rotates the..

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

plz answer....A program that takes 3 variables e.g a,b,c in as seperate parameters and rotates the..

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

plz answer....A program that takes 3 variables e.g a,b,c in as seperate parameters and rotates the..

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

Post New Answer

More C Interview Questions

Explain what?s happening in the first constructor: public class c{ public c(string a) : this() {;}; public c() {;} } How is this construct useful?

1 Answers  


Reverse the part of the number which is present from position i to j. Print the new number.[without using the array] eg: num=789876 i=2 j=5 778986

2 Answers  


What is infinite loop?

0 Answers  


How can I list all of the predefined identifiers?

0 Answers  


What is pointer to pointer in c?

0 Answers  






Define macros.

0 Answers   Tech Mahindra,


1 1 12 21 123 321 12344231 how i creat it with for loop??

1 Answers  


GIVEN A FLOATING POINT NUMBER HOW IS IT ACTUALLY STORED IN MEMORY ? CAN ANYONE EXPLAIN?? THE 32 BIT REPRESENTATION OF A FLOATING POINT NUMBER ALLOTS: 1 BIT-SIGN 8 BITS-EXPONENT 23 BITS-MANTISSA

0 Answers  


suppose we use switch statement and we intilize years name using enum statement like(jan,feb,mar,------dec) we take integer value as an input .question is that the month which we analyz is from 0 to 11 bt if i enter 12 than how he again starts from begning and print jan

1 Answers  


Program to find larger of the two numbers without using if-else,while,for,switch

11 Answers   iNautix, Wipro,


write a fuction for accepting and replacing lowercase letter to'Z' with out using inline function.

5 Answers   Temenos,


what is the flow of execution in cprogram? ex:printf();,scanf();

2 Answers  


Categories