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
How arrays can be passed to a user defined function
Take an MxN matrice from user and then sum upper diagonal in a variable and lower diagonal in a separate variables. Print the result
Explain what is a stream?
What are actual arguments?
Can you mix old-style and new-style function syntax?
Explain what could possibly be the problem if a valid function name such as tolower() is being reported by the c compiler as undefined?
Which header file should you include if you are to develop a function which can accept variable number of arguments?
What are the advantages of using linked list for tree construction?
What is c programming structure?
How can I send mail from within a c program?
What are header files why are they important?
How can I run c program?
What is the difference between a function and a method in c?
Write a program to reverse a given number in c language?
Is boolean a datatype in c?