Write a program to interchange two variables without using
the third variable?
Answer Posted / raghavendra
#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=a/b;
printf("After chanching no is =\n");
printf("a=%d b=%d",a,b);
getch();
}
Is This Answer Correct ? | 6 Yes | 9 No |
Post New Answer View All Answers
Under what circumstances does a name clash occur?
Why is it usually a bad idea to use gets()? Suggest a workaround.
Distinguish between actual and formal arguments.
Write a program to print fibonacci series using recursion?
Program will then find the largest of three numbers using nested if-else statements. User is prompted to enter three numbers. Program will find the largest number and display it on the screen. All three numbers entered by the user are also displayed. If user enters 21, 33, and 5, the output should be as follows: You entered: 21, 33 and 5. The largest number is 33.
GIven a sequence of characters. How will you convert the lower case characters to upper case characters. ( Try using bit vector - sol given in the C lib -> typec.h)
What is bss in c?
What is c definition?
What is oops c?
What is a spanning Tree?
Explain what is wrong in this statement?
What is the use of putchar function?
What is table lookup in c?
Explain setjmp()?
What are pragmas and what are they good for?