How do we swap or interchange any 2 numbers without using
Temporary variable...Anybody can pls answer it.. Thanks in
Advance
Answer Posted / girish
#include<stdio.h>
#include<conio.h>
#include<stdlib.h>
void main()
{
int a,b;
clrscr();
printf("Enter the two values:");
scanf("%d%d",&a,&b);
swap(a,b);
pritnf("the swaping of given two values are:\na=%d,b=%
d",a,b);
getch();
}
| Is This Answer Correct ? | 0 Yes | 3 No |
Post New Answer View All Answers
Why c is a mother language?
What are linked lists in c?
write a program that declares an array of 30 elements named "income" in the main functions. then cal and pass the array to a programmer-defined function named "getIncome" within the "getIncome" function, ask the user for annual income of 30 employees. then calculate and print total income on the screen using the following function: "void getIncome ( ai []);
#include show(int t,va_list ptr1) { int a,x,i; a=va_arg(ptr1,int) printf(" %d",a) } display(char) { int x; listptr; va_star(otr,s); n=va_arg(ptr,int); show(x,ptr); } main() { display("hello",4,12,13,14,44); }
What is the difference between typedef and #define?
What are variables and it what way is it different from constants?
Can you apply link and association interchangeably?
What are the advantages and disadvantages of pointers?
Which is not valid in C a) class aClass{public:int x;}; b) /* A comment */ c) char x=12;
Explain what is the difference between text files and binary files?
Why main is used in c?
How does free() know explain how much memory to release?
Can we access the array using a pointer in c language?
Can you assign a different address to an array tag?
What is a wrapper function in c?