write a program to interchange the value between two variable
without using loop

Answer Posted / mudita rathore

#include<stdio.h>
void main()
{
int a,b,temp;
printf("enter value of a=");
scanf("%d",&a);
printf("enter the value of b=");
scanf("%d",&b);
temp=a;
a=b;
b=temp;
printf("a=%d b=%d",a,b);
}

Is This Answer Correct ?    5 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Where in memory are my variables stored?

616


Can you apply link and association interchangeably?

661


When can a far pointer be used?

576


How to declare a variable?

556


Write a program to print factorial of given number without using recursion?

554






What does *p++ do?

570


Why is C language being considered a middle level language?

637


A float occupies 4 bytes in memory. How many bits are used to store exponent part? since we can have up to 38 number for exponent so 2 ki power 6 6, 6 bits will be used. If 6 bits are used why do not we have up to 64 numbers in exponent?

1758


Write a program to know whether the input number is an armstrong number.

658


Explain argument and its types.

583


What is c language & why it is used?

568


Which is not valid in C a) class aClass{public:int x;}; b) /* A comment */ c) char x=12;

601


What is file in c language?

566


When should we use pointers in a c program?

614


What is the meaning of c in c language?

586