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

What is the need of structure in c?

776


How can I do peek and poke in c?

834


What is const and volatile in c?

780


writ a program to compare using strcmp VIVA and viva with its output.

1760


How do you list files in a directory?

794


Can you please explain the difference between malloc() and calloc() function?

849


What are the salient features of c languages?

845


What is "Duff's Device"?

891


the number of measuring units from a arbitrary starting point in a record area or control block to some other point a) branching b) recording pointer c) none d) offset

842


What are the two types of structure?

794


What is array in C

910


What are bitwise shift operators in c programming?

823


What is the use of c language in real life?

763


What is the difference between procedural and declarative language?

875


What are the advantages of using macro in c language?

797