FREE : [ Study Material ] NDA/SSB Preparation : Check Now!!! | Latest: HR Interview Questions:CHECK | Like Us :

Saturday, 22 December 2012

Program to Swap 2 numbers without using third Variable | C Program


Input



#include<stdio.h>
#include<conio.h>
void main()
{
int a,b;
clrscr();
printf("Swapping of two numbers without using temporary variable\n");
printf("Enter the two number");
scanf("%d%d",&a,&b);
printf("Numbers\n a=%d\t b=%d \n",a,b);
a=a+b;
b=a-b;
a=a-b;
printf("Numbers after\n Swapping a=%d\t b=%d",a,b);
getch();
}


Turbo C




Please Submit your Responses
 

Results

get our extension

Like Us on FB

    Freshers Jobs

    Donate

    DMCA Protected

    You are Visitor Number

    Interview Questions

    SSB Questions

      Authors
    Tinku Singh
    Hitesh Dhanda

    MrNaukri.com - Get Sarkari Jobs, Results, Off Campus Placement Updates © 2012. All Rights Reserved | Back To Top |

    © 2013 A Product of IBC Network