Write a program that takes three variables(a,b,c) in as
separate parameters and rotates the values stored so that
value a goes to b,b,to c and c to a
Answer Posted / nitin
void main()
{
int a,b,c;
printf("enter the values of a,b &c");
scanf("%d%d%d",&a,&b,&c);
c=c+a;
a=c-a;
c=c+b;
b=c-b;
c=c-b;
printf("\n values of ab & c are=%d%d%d",a,b,c);
getch();
}
| Is This Answer Correct ? | 5 Yes | 3 No |
Post New Answer View All Answers
What is main function in c?
What are the disadvantages of c language?
Explain what is a const pointer?
Can you please explain the difference between syntax vs logical error?
a value that does not change during program execution a) variabe b) argument c) parameter d) none
What is scope and lifetime of a variable in c?
The purpose of this exercise is to benchmark file writing and reading speed. This exercise is divided into two parts. a). Write a file character by character such that the total file size becomes approximately >10K. After writing close the file handler, open a new stream and read the file character by character. Record both times. Execute this exercise at least 4 times b). Create a buffer capable of storing 100 characters. Now after generating the characters, first store them in the buffer. Once the buffer is filled up, store all the elements in the file. Repeat the process until the total file size becomes approximately >10K.While reading read a while line, store it in buffer and once buffer gets filled up, display the whole buffer. Repeat the exercise at least 4 times with different size of buffer (50, 100, 150 …). Records the times. c). Do an analysis of the differences in times and submit it in class.
Is there a way to have non-constant case labels (i.e. Ranges or arbitrary expressions)?
Define and explain about ! Operator?
How many levels deep can include files be nested?
Why c is called procedure oriented language?
Create a registration form application by taking the details like username, address, phone number, email with password and confirm password (should be same as password).Ensure that the password is of 8 characters with only numbers and alphabets. Take such details for 3 users and display the details. While taking input password must appear as “****”.
What are the advantages of using new operator as compared to the function malloc ()?
What is the right type to use for boolean values in c?
A c program to display count values from 0 to 100 and flash each digit for a secong.reset the counter after it reaches 100.use for loop,. pls guys hepl me.. :(