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

List some basic data types in c?

572


How can you find the exact size of a data type in c?

615


If i have an array 0 to 99 i.e,(Size 100) I place the values 1 to 100 randomly like a[0]=29,a[1]=56 upto array[99].. the values are only between 1 to 100. getting the array values by using scanf.. If i entered one wrong element value line a[56]=108. how can i find it.. and also how to find the missing value in 1 to 100.. and i want to replace the missing values.. any one of them know please post your answer..

1602


Explain the difference between #include "..." And #include <...> In c?

638


Who invented b language?

928






What is time complexity c?

580


What is the purpose of clrscr () printf () and getch ()?

607


Can a file other than a .h file be included with #include?

692


What is variable and explain rules to declare variable in c?

562


What is New modifiers?

682


Are there namespaces in c?

578


how should functions be apportioned among source files?

634


Explain what is wrong with this program statement? Void = 10;

777


write a program to find out prime number using sieve case?

1648


Why is main function so important?

626