Write a program to print the swapping in two no and using
three variable.

Answer Posted / saiteja gangisetty

#include<stdio.h>
void main()
{
int a,b,temp;
printf("enter a, b values");
scanf("%d%d",a,b);
temp=a;
a=b; (or) // b=a*b/a=b;
b=temp;
printf("a=%d and b=%d",a,b);
}

Is This Answer Correct ?    7 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is stl stack?

665


What is a list in c++ stl?

696


a program using one dimensional array that searches a number if it is found on the list of given input numbers given by the user and locate its exact location in the list.

1383


What are the different types of stl containers?

652


i wanted to know about questions about c,c++ , which is required for placements.... im a fresher

1702






How does an stl file work?

656


What are the components of stl?

626


write a program to convert a decimal number in to its equivalent binary number?

2084


How is stl different from c++ standard library?

748


Can we use stl in coding interviews?

1284


Name the different types of stl containers.

695


Is there any error below, its a code to delete all entires from a map #include #include iostream.h int main() { int i =0; map TestMap; while(i<3) { TesMap.insert(TestMap::value_type(i,Test)); i++; } typedef map :: iterator mapIter =TestMap.begin(); if(mapIter!=TestMap.end()) { TestMap.erase(mapItrer); ++mapIter; } return 0; }

1896


What is stl in oop?

681


Explain stl.

907


How stl is different from the c++ standard library?

645