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

how to find anagram without using string functions using only loops in c programming

0 Answers  


What does it mean when a pointer is used in an if statement?

0 Answers  


1)which of following operator can't be overloaded. a)== b)++ c)?! d)<=

16 Answers   CybOrg, Siemens,


What does the && operator do in a program code?

0 Answers  


What does malloc () calloc () realloc () free () do?

0 Answers  


exit () is used to a) exit () terminates the execution of the program itself b) exit () terminates the execution of the loop c) exit () terminates the execution of the block d) none of the above

0 Answers  


in C-programming language without using printf statement can we get output r not ? if yes how and if no also how ?

11 Answers   IBM,


What does the message "automatic aggregate intialization is an ansi feature" mean?

0 Answers  


A function 'q' that accepts a pointer to a character as argument and returns a pointer to an array of integer can be declared as: A)int (*q(char*)) [] B)int *q(char*) [] C)int(*q)(char*) [] D)None of the Above

2 Answers   Accenture,


What is the use of function overloading in C?

0 Answers   Ittiam Systems,


Stimulate calculators to perform addition,subtraction,multiplication and division on two numbers using if/else statement?

1 Answers   IBM,


What is #include stdio h?

0 Answers  


Categories