बिजनेस मार्केटिंग का लो कॉस्ट फंडा , अपने मोबाइल से ऑटो sms भेजकर मार्केटिंग करे विजिट करे http://autotextsms.com/ बिजनेस मार्केटिंग का लो कॉस्ट फंडा http://autotextsms.com/

Search This Blog

Translate

C Program for swapping two numbers without using third variable

C Program for swapping two numbers without using third variable

void main()
{
    int a,b,temp=0;
    clrscr();
    printf("\nEnter the first number=");
    scanf("%d",&a);
    printf("\nEnter the second number=");
    scanf("%d",&b);
    printf("\n\n*** Original value ***\nFirst value is=%d\n\nSecond value is=%d",a,b);
    temp=a;
    a=b;
    b=temp;
    printf("\n\n*** After swapping ***\n\nFirst value is=%d\n\nSecond value is=%d",a,b);
    getch();
}

C Program for swapping two numbers without using third variable




C Program example List