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
What is array in c with example?
Why header file is used in c?
Explain spaghetti programming?
What are the functions to open and close file in c language?
a program that performs some preliminary processing in C, it acts upon certain directives that will affect how the compiler does its work a) compiler b) loader c) directive d) preprocessor
a) Identify the following declarations. Ex. int i (integer variable) float a[l0](array of 10 real nos) int (*f())() void *f int (*f()) [] void *f int f[] [] [] char *(*f) () int (*f[]) [] float(*f) [] [] float **f int ******f
What type is sizeof?
Are enumerations really portable?
How many keywords are there in c?
How was c created?
Write a program to check palindrome number in c programming?
What are the different file extensions involved when programming in C?
Explain what is wrong with this program statement?
How arrays can be passed to a user defined function
Explain what is the benefit of using #define to declare a constant?