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...

a C prog to swap 2 no.s without using variables just an
array?

Answer Posted / laxmi bose

#include<stdio.h>
main()
{
int a[0],a[1],a[2];
scanf("%d%d",&a[0],&a[1]);
a[2]=a[0];
a[0]=a[1];
a[1]=a[2];
printf("%d,%d",a[0],a[1]);
}

Is This Answer Correct ?    11 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is a const pointer?

1035


Can a program have two main functions?

1057


Can we declare variables anywhere in c?

946


Write a program to identify if a given binary tree is balanced or not.

1089


How do you print only part of a string?

963


What is keyword in c?

958


I completed my B.tech (IT). Actually I want to develop virtual object that which will change software technology in the future. To develop virtual object what course I have to take. can I any professor to help me.

2155


What is restrict keyword in c?

1049


What is mean by data types in c?

963


Which built-in library function can be used to match a patter from the string?

1235


What is the method to save data in stack data structure type?

1034


What is a #include preprocessor?

1072


What is a example of a variable?

947


Why is c so important?

991


What is a null pointer in c?

1122