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 ?    3 Yes 2 No

Post New Answer




More C Interview Questions

implement NAND gate logic in C code without using any bitwise operatior.

4 Answers   Alcatel,


If "AaBbCc" is passed to the char char x(*a) { a[0]?x(a+1):1; printf("%c",a[0]); return 1; } what will be the output?

6 Answers   Hughes,


how do you programme Carrier Sense Multiple Access

0 Answers  


what will be the output for the following program? main() { char ch = 'k'; char c; printf("%c",c); }

3 Answers  


Why Modern OS are interrupt driven?Give an example

3 Answers  






matrix multiplication fails introspect the causes for its failure and write down the possible reasons for its failurein c language.

5 Answers   TCS,


what is the difference between getch() and getchar()?

10 Answers   Infosys, Huawei,


Why is event driven programming or procedural programming, better within specific scenario?

0 Answers   Wipro,


char S; char S[6]= " HELLO"; printf("%s ",S[6]); output of the above program ? (0, ASCII 0, I,unpredictable)

7 Answers   Mascot,


Explain following declaration int *P(void); and int (*p)(char *a);

3 Answers  


What is the difference between null pointer and void pointer

9 Answers   CTS, Manforce, MAQ Software,


what will be maximum number of comparisons when number of elements are given?

0 Answers  






Categories