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
Can 'this' pointer by used in the constructor?
What is void main ()?
Is struct oop?
What is gets() function?
What is the difference between mpi and openmp?
Is c easy to learn?
What is a loop?
Explain what are header files and explain what are its uses in c programming?
Differentiate between #include<...> and #include '...'
What is c language & why it is used?
What is calloc() function?
what are the advantages of a macro over a function?
Is there a built-in function in C that can be used for sorting data?
how to execute a program using if else condition and the output should enter number and the number is odd only...
Explain what are the advantages and disadvantages of a heap?