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
main() { struct s1 { char *str; struct s1 *ptr; }; static struct s1 arr[] = { {"Hyderabad",arr+1}, {"Bangalore",arr+2}, {"Delhi",arr} }; struct s1 *p[3]; int i; < BR> for(i=0;i<=2;i++) p[i] = arr[i].ptr; printf("%s ",(*p)->str); printf("%s ",(++*p)->str); printf("%s ",((*p)++)->str); }
Why c is faster than c++?
Can include files be nested? How many levels deep can include files be nested?
Write a program for finding factorial of a number.
Explain what is the most efficient way to store flag values?
please give me a VIRTUSA sample palcement papers.... you will only send TECHNICAL SECTION..... that is help for me Advance Thanks........................
Do pointers take up memory?
How can I write data files which can be read on other machines with different word size, byte order, or floating point formats?
Explain how can I read and write comma-delimited text?
What is the use of volatile?
What are the advantages and disadvantages of pointers?
What does a derived class inherit from a base class a) Only the Public members of the base class b) Only the Protected members of the base class c) Both the Public and the Protected members of the base class d) .c file
what is uses of .net
What are the salient features of c languages?
What is the difference between pure virtual function and virtual function?