write a program to swap Two numbers without using temp variable.
Answer Posted / ankit tiwari
#include<stdio.h>
#include<conio.h>
void main()
{
int a,b;
printf("enter the two number");
scanf("%d%d",&a,&b);
a=b-a;
b=b-a;
a=b+a;
printf("ais=%d",a);
printf("b is=%d",b);
getch();
}
| Is This Answer Correct ? | 2 Yes | 0 No |
Post New Answer View All Answers
What is malloc and calloc?
What does s c mean in text?
Write a C program on Centralized OLTP, Decentralized OLTP using locking mechanism, Semaphore using locking mechanism, Shared memory, message queues, channel of communication, sockets and a simple program on Saving bank application program using OLTP in IPC?
What is page thrashing?
What is || operator and how does it function in a program?
Is c call by value?
Want to know how to write a C program that connects to a MySQL server and checks if the InnoDB plug-in is installed on it. If so, your program should print the total number of disk writes by MySQL.
#include show(int t,va_list ptr1) { int a,x,i; a=va_arg(ptr1,int) printf(" %d",a) } display(char) { int x; listptr; va_star(otr,s); n=va_arg(ptr,int); show(x,ptr); } main() { display("hello",4,12,13,14,44); }
Explain about the constants which help in debugging?
What's the difference between constant char *p and char * constant p?
What is a #include preprocessor?
What are the types of macro formats?
Is c programming hard?
How can I find out how much free space is available on disk?
The __________ attribute is used to announce variables based on definitions of columns in a table?