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



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

Answer / 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

More C Interview Questions

what does ‘Bus Error’ mean?

1 Answers   ABC,


How a string is stored in c?

0 Answers  


What are the different categories of functions in c?

0 Answers  


how to devloped c lenguege?

4 Answers  


What standard functions are available to manipulate strings?

0 Answers  






what is the difference between : func (int list[], ...) or func (int *list , ....) - what is the difference if list is an array and if also if list is a pointer

2 Answers  


the real constant in c can be expressed in which of the following forms a) fractional form only b) exponential form only c) ascii form only d) both a and b

0 Answers  


What is the value of y in the following code? x=7;y=0; if(x=6) y=7; else y=1;

12 Answers   TCS,


What is true about the following C Functions (a) Need not return any value (b) Should always return an integer (c) Should always return a float (d) Should always return more than one value

2 Answers   DynPro, TCS,


Tell me can the size of an array be declared at runtime?

0 Answers  


What is the difference between the = symbol and == symbol?

0 Answers  


what are the uses of structure?

7 Answers   HCL,


Categories