wat are the two methods for swapping two numbers without
using temp variable??
Answer Posted / vijayakumar kanagasabai
main()
{
int a=4;b=6;
printf("Before swapping: a=%d, b=%d",a,b);
a=a+b;
b=a-b;
a=a-b;
printf("After swapping: a=%d, b=%d",a,b);
}
| Is This Answer Correct ? | 11 Yes | 1 No |
Post New Answer View All Answers
How can you invoke another program from within a C program?
Does * p ++ increment p or what it points to?
The process of repeatedly running a set of computer instructions until some condition is specifed a) condition b) sequential condition c) global d) iteration
What is function and its example?
a way in which a pointer stores the address of a pointer which stores the value of the target value a) reference b) allocation c) multiple indirection d) none
Write an efficient algo and C code to shuffle a pack of cards.. this one was a feedback process until we came up with one with no extra storage.
What is the meaning of ?
What functions are used for dynamic memory allocation in c language?
the factorial of non-negative integer n is written n! and is defined as follows: n!=n*(n-1)*(n-2)........1(for values of n greater than or equal to 1 and n!=1(for n=0) Perform the following 1.write a c program that reads a non-negative integer and computes and prints its factorial. 2. write a C program that estimates the value of the mathematical constant e by using the formula: e=1+1/!+1/2!+1/3!+.... 3. write a c program the computes the value ex by using the formula ex=1+x/1!+xsquare/2!+xcube/3!+....
How many levels of pointers can you have?
in programming languages a statement or part of a statement that specifies several different execution sequences a) constructs b) distructs c) executes d) none
What is the advantage of using #define to declare a constant?
What is main return c?
What is #include conio h?
A float occupies 4 bytes in memory. How many bits are used to store exponent part? since we can have up to 38 number for exponent so 2 ki power 6 6, 6 bits will be used. If 6 bits are used why do not we have up to 64 numbers in exponent?