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
What is calloc()?
How can you draw circles in C?
What are the different types of data structures in c?
What is an array in c?
What is break in c?
What is sizeof in c?
what is associativity explain what is the precidence for * and & , * and ++ how the folloing declaration work 1) *&p; 2) *p++;
how can use subset in c program and give more example
Why we use void main in c?
How do you do dynamic memory allocation in C applications?
Explain how do you override a defined macro?
Why do we need a structure?
What is the difference between class and object in c?
Write a code to determine the total number of stops an elevator would take to serve N number of people.
Can static variables be declared in a header file?