Write a program to interchange two variables without using
the third variable?
Answer Posted / ramesh mca gprec knl
#include<stdio.h>
#include<conio.h>
void main()
{
int a,b,c;
clrscr();
printf("Enter two no");
scanf("%d%d",&a,&b);
c=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 ? | 1 Yes | 4 No |
Post New Answer View All Answers
What is methods in c?
a direct address that identifies a location by means of its displacement from a base address or segment a) absolute address b) relative address c) relative mode d) absolute mode
Explain the advantages and disadvantages of macros.
Can you write the algorithm for Queue?
What is formal argument?
What is hashing in c?
What is clrscr ()?
Explain c preprocessor?
write a C program:There is a mobile keypad with numbers 0-9 and alphabets on it. Take input 0f 7 keys and then form a word from the alphabets present on the keys.
Tell me is null always defined as 0(zero)?
Can we declare function inside main?
Create a structure to specify data on students as given below: Roll number, Name, Department, Course, and Year of joining. Assume that there are not more than 450 students in the collage. (a) Write a function to print the names of all students who joined in the last 3 years. (b) Write a function to print the data of a student whose roll numbers are divisible by 4.
where are auto variables stored? What are the characteristics of an auto variable?
What is stack in c?
What are reserved words with a programming language?