write a program to swap Two numbers without using temp variable.
Answer Posted / dally
#include<stdio.h>
int main()
{
int a,b;
printf("Enter values for a,b\n");
scanf("%d %d",&a,&b);
b = b+a;
a= b-a;
b=b-a;
printf("a = %d,b = %d",a,b);
}
| Is This Answer Correct ? | 18 Yes | 11 No |
Post New Answer View All Answers
Using functions, write a program that multiplies two arrays. Use the following functions: - Function ReadArray - Function MultiplyArrays - Function DisplayArrays
Explain the difference between malloc() and calloc() in c?
Differentiate between static and dynamic modeling.
What is an lvalue in c?
What are qualifiers in c?
Give a one-line C expression to test whether a number is a power of 2. [No loops allowed - it's a simple test.]
main() { int i = 10; printf(" %d %d %d ", ++i, i++, ++i); }
What is difference between constant pointer and constant variable?
if a is an integer variable, a=5/2; will return a value a) 2.5 b) 3 c) 2 d) 0
Which programming language is best for getting job 2020?
Do you know pointer in c?
In c programming language, how many parameters can be passed to a function ?
Can a pointer be null?
How can you allocate arrays or structures bigger than 64K?
Write a program to reverse a linked list in c.