Write a program to interchange two variables without using
the third variable?
Answer Posted / jisha. k.a
#include<stdio.h>
#include<conio.h>
void main()
{
int a,b;
clrscr();
printf("Enter two no");
scanf("%d%d",&a,&b);
a=a-b;
b=a+b;
a=b-a;
printf("After chanching no is =\n");
printf("a=%d b=%d",a,b);
getch();
}
Is This Answer Correct ? | 34 Yes | 16 No |
Post New Answer View All Answers
How to write c functions that modify head pointer of a linked list?
Write the program that calculates and prints the average of several integers. Assume that the last value read is sentinel 9999.
Do you know what are the properties of union in c?
Is that possible to add pointers to each other?
write a progrmm in c language take user interface generate table using for loop?
How can type-insensitive macros be created?
Why string is used in c?
Are there constructors in c?
What is the size of structure in c?
What are run-time errors?
What are the output(s) for the following ? #include char *f() {char *s=malloc(8); strcpy(s,"goodbye")} main() { char *f(); printf("%c",*f()='A'); }
What does %2f mean in c?
What does the error 'Null Pointer Assignment' mean and what causes this error?
#define f(g,h) g##h main O int i=0 int var=100 ; print f ("%d"f(var,10));} wat would be the output??
What is function what are the types of function?