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 / sankar kiran

#include<stdio.h>
#include<conio.h>
void main()
{
int a,b;
printf("Enter the number:");
scanf("%d%d",&a,&b)
a=a+b;
b=a-b;
a=a-b;
printf("%d%d",a,b);
getch();

}

Is This Answer Correct ?    14 Yes 7 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

By using C language input a date into it and if it is right?

1022


Is fortran faster than c?

987


An integer that indentifies the position of a data item in a sequence of data items a) value b) number c) index d) all of the above

1157


What is Dynamic memory allocation in C? Name the dynamic allocation functions.

1337


How can I sort more data than will fit in memory?

1043


When is a null pointer used?

1066


Do you know what are bitwise shift operators in c programming?

1062


write a program which the o/p should b in such a way that s triangle if I/p is 3,a Square/rectangle if I/P=4,a pentagon if I/P=5 and so on...forget about the I/P which is less than 3

2033


What is difference between arrays and pointers?

1016


Differentiate between Macro and ordinary definition.

1277


What is the use of a ‘’ character?

1029


write an interactive C program that will encode or decode a line of text.To encode a line of text,proceed as follows. 1.convert each character,including blank spaces,to its ASCII equivalent. 2.Generate a positive random integer.add this integer to the ASCII equivalent of each character.The same random integer will be used for the entire line of text. 3.Suppose that N1 represents the lowest permissible value in the ASCII code,and N2 represents the highest permissible value.If the number obtained in step 2 above(i.e.,the original ASCII equivalent plus the random integer)exceeds N2,then subtract the largest possible multiple of N2 from this number,and add the remainder to N1.Hence the encoded number will always fall between N1 and N2,and will therefore always represent some ASCII character. 4.Dislay the characters that correspond to the encoded ASCII values.  The procedure is reversed when decoding a line of text.Be certain,however,that the same random number is used in decodingas was used in encoding.

3402


which is an algorithm for sorting in a growing Lexicographic order

1749


Difference between pass by reference and pass by value?

1100


Can we access array using pointer in c language?

1043