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 |
Explain what?s happening in the first constructor: public class c{ public c(string a) : this() {;}; public c() {;} } How is this construct useful?
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
What is infinite loop?
How can I list all of the predefined identifiers?
What is pointer to pointer in c?
Define macros.
1 1 12 21 123 321 12344231 how i creat it with for loop??
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
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
Program to find larger of the two numbers without using if-else,while,for,switch
write a fuction for accepting and replacing lowercase letter to'Z' with out using inline function.
what is the flow of execution in cprogram? ex:printf();,scanf();