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 .

Answer Posted / 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       View All Answers


Please Help Members By Posting Answers For Below Questions

Linked list is a Linear or non linear explain if linear how it working as a non linear data structures

1764


What is the basic structure of c?

557


Explain the advantages of using macro in c language?

582


What is wrong in this statement? scanf(ā€œ%dā€,whatnumber);

730


What is a sequential access file?

648






How can you access memory located at a certain address?

668


How can I dynamically allocate arrays?

594


#include #include struct stu { int i; char j; }; union uni { int i; char j; }; void main() { int j,k; clrscr(); struct stu s; j=sizeof(s); printf("%d",j); union uni u; k=sizeof(u); printf("%d",k); getch(); } what is value of j and k.

5210


In C language, the variables NAME, name, and Name are all the same. TRUE or FALSE?

771


please give me some tips for the placement in the TCS.

1634


What are the benefits of organizational structure?

575


What was noalias and what ever happened to it?

592


What is the method to save data in stack data structure type?

609


what value is returned to operating system after program execution?

1607


What is difference between scanf and gets?

615