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
What is the difference between memcpy and memmove?
Is a house a shell structure?
What are the functions to open and close the file in c language?
Difference between macros and inline functions? Can a function be forced as inline?
What is a good way to implement complex numbers in c?
What does *p++ do? What does it point to?
What is indirection?
How are portions of a program disabled in demo versions?
Write the syntax and purpose of a switch statement in C.
If jack lies on Mon, Tue Wed and jill lies on Thursday, Friday and Saturday. If both together tell they lied yesterday. So c the given options and then c cos in the given dates one will be saying the truth and one will be lying. I got Thursday as option because jack is saying the truth he lied yest but jill is lying again as he lies on that day.
What is difference between structure and union with example?
a way in which a pointer stores the address of a pointer which stores the value of the target value a) reference b) allocation c) multiple indirection d) none
What is a memory leak? How to avoid it?
What is C language ?
When should we use pointers in a c program?