write a origram swaoing valu without 3rd variable
Answers were Sorted based on User's Feedback
Answer / jeevanvns
#include<stdio.h>
#include<conio.h>
void main()
{
int a,b;
clrscr();
printf("enter the valu");
scanf("%d%d",&a,&b);
a=a+b;
b=a-b;
a=a-b;
printf("%d\t %d\t",a,b);
getch();
}
Is This Answer Correct ? | 8 Yes | 0 No |
Answer / tejesh
#include<stdio.h>
#include<conio.h>
void main()
{
int a,b;
clrscr();
printf("enter the value");
scanf("%d%d",&a,&b);
a=a^b; //xor operator -- ^
b=a^b;
a=a^b;
printf("%d\t %d\t",a,b);
getch();
}
Is This Answer Correct ? | 0 Yes | 0 No |
How to access command-line arguments?
find A^B using Recursive function
Design an implement of the inputs functions for event mode
What is "far" and "near" pointers in "c"...?
Find your day from your DOB?
15 Answers Accenture, Microsoft,
find simple interest & compund interest
what will be the output of this program? void main() { int a[]={5,10,15}; int i=0,num; num=a[++i] + ++i +(++i); printf("%d",num); }
main() { int i; float *pf; pf = (float *)&i; *pf = 100.00; printf("\n %d", i); } a. Runtime error. b. 100 c. Some Integer not 100 d. None of the above
how to return a multiple value from a function?
write a simple calculator c program to perform addition, subtraction, mul and div.
0 Answers United Healthcare, Virtusa,
what is oop?
prog. to produce 1 2 3 4 5 6 7 8 9 10