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
Who developed c language?
can we implement multi-threads in c.
What is volatile variable how do you declare it?
Explain what are compound statements?
Explain how can I remove the trailing spaces from a string?
Can you please explain the difference between syntax vs logical error?
Describe explain how arrays can be passed to a user defined function
void main(){ int a; a=1; while(a-->=1) while(a-->=0); printf("%d",a); }
c language supports bitwise operations, why a) 'c' language is system oriented b) 'c' language is problem oriented c) 'c' language is middle level language d) all the above
general for is %wd,f-d; in this system "w" means a) 'w' represent total width of digits b) 'w' represent width which includes the digits before,after decimal place and the decimal point c) 'w' represent width which includes the digits before only d) 'w' represent width after decimal place only
What is masking?
Can we use visual studio for c?
What are control structures? What are the different types?
What do header files do?
What are different types of variables in c?