a C prog to swap 2 no.s without using variables just an
array?
Answer Posted / jaspreet singh
void main()
{
int a[2]={20,10};
a[0]=a[0]^a[1];
a[1]=a[0]^a[1];
a[0]=a[0]^a[1];
printf("a=%d,b=%d",a[0],a[1])
getch();
}
| Is This Answer Correct ? | 7 Yes | 4 No |
Post New Answer View All Answers
How variables are declared in c?
In a switch statement, explain what will happen if a break statement is omitted?
Differentiate between full, complete & perfect binary trees.
main() { inta=10,b=20; a>=5?b=100:b=200; printf("%d ",b); }
why arguments can generally be passed to functions a) sending the values of the arguments b) sending the addresses of the arguments c) a & b d) none of the above
How arrays can be passed to a user defined function
How do I get an accurate error status return from system on ms-dos?
What is sorting in c plus plus?
What is boolean in c?
In this problem you are to write a program that will cut some number of prime numbers from the list of prime numbers between 1 and N.Your program will read in a number N; determine the list of prime numbers between 1 and N; and print the C*2 prime numbers from the center of the list if there are an even number of prime numbers or (C*2)-1 prime numbers from the center of the list if there are an odd number of prime numbers in the list.
Differentiate fundamental data types and derived data types in C.
What is pragma in c?
Describe explain how arrays can be passed to a user defined function
Describe how arrays can be passed to a user defined function
Explain what is wrong in this statement?