write a prgram of swapping with 2 valiables

Answer Posted / suresh

#include<stdio.h>
#include<conio.h>
void main()
{
int a,b,c;
d=0;
printf("enter a");
scanf("%d",&a);
printf("enter b");
scanf("%d",&b);
c=a;
a=b;
b=c;
printf("a & b value are%d%d",a,b);
getch();
}

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain the use of 'auto' keyword in c programming?

790


What is data structure in c programming?

667


Can the “if” function be used in comparing strings?

687


What is line in c preprocessor?

698


we need to calculating INCOME TAX for the person. The INCOME TAX is as follows:- First $10000/- of income : 4% tax Next $10000/- of income : 8% tax Next $10000/- of income : 11.5% tax above $10, 00,00/- : 15% tax What is the Solution of this Question ?

911






What is 2c dna?

699


how can i write a program that prints out a box such that whenever i press any key8(coordinate number) on the keyboard, the box moves.

1309


How is a null pointer different from a dangling pointer?

661


In c programming typeing to occupy the variables in memory space. if not useing the variable the memory space is wasted.ok, how to avoid the situation..? (the variable is used & notused)

1744


On most computers additional memory that is accessed through an adapter of feature card along with a device driver program. a) user memory b) conventional memory c) expandedmemory d) area

773


What is the difference between formatted&unformatted i/o functions?

713


how is the examination pattern?

1693


What the different types of arrays in c?

706


How are variables declared in c?

703


What is const keyword in c?

855