Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

What is malloc and calloc?

1100


What does s c mean in text?

1141


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?

2752


What is page thrashing?

1137


What is || operator and how does it function in a program?

1157


Is c call by value?

1074


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.

2096


#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); }

1321


Explain about the constants which help in debugging?

1415


What's the difference between constant char *p and char * constant p?

1191


What is a #include preprocessor?

1219


What are the types of macro formats?

1163


Is c programming hard?

1077


How can I find out how much free space is available on disk?

1101


The __________ attribute is used to announce variables based on definitions of columns in a table?

1251