how to swap two integers 1 and 32767 without using third
variable
Answer Posted / riya ganguly
int a=1,b=32767;
a=a+b;
b=a-b;
a=a-b;
printf("a=%d,b=%d",a,b);
Is This Answer Correct ? | 17 Yes | 5 No |
Post New Answer View All Answers
How would you use the functions fseek(), freed(), fwrite() and ftell()?
When I set a float variable to, say, 3.1, why is printf printing it as 3.0999999?
What is variable initialization and why is it important?
How do we declare variables in c?
Write a program to reverse a given number in c?
What are data types in c language?
How to declare a variable?
Can a pointer be volatile in c?
HOW TO SOLVE A NUMERICAL OF LRU IN OS ??????
Where is c used?
What would be an example of a structure analogous to structure c?
What is array in c with example?
What are the two types of structure?
Should I use symbolic names like true and false for boolean constants, or plain 1 and 0?
In this problem you are to write a program that will cut some number of prime numbers from the list of prime numbers between 1 and N.Your program will read in a number N; determine the list of prime numbers between 1 and N; and print the C*2 prime numbers from the center of the list if there are an even number of prime numbers or (C*2)-1 prime numbers from the center of the list if there are an odd number of prime numbers in the list.