write a program to swap two variables a=5 , b= 10 without
using third variable
Answer Posted / samruthi
#include<stdio.h>
void main()
{
int a=5,b=10;
printf("The value of A is:%d",a);
printf("\n The value of B is:%d",b);
b=a;
a=b;
a=b+a;
printf("\n The value of A is:%d",a);
printf("\n The value of B is:%d",b);
getch();
}
Is This Answer Correct ? | 10 Yes | 7 No |
Post New Answer View All Answers
Does sprintf put null character?
Write a program to swap two numbers without using the third variable?
hi, which software companys will take,if d candidate's % is jst 55%?
What are keywords in c with examples?
Where is c used?
write a program to print data of 5 five students with structures?
Explain what is wrong with this statement? Myname = ?robin?;
What are the rules for identifiers in c?
write a program to concatenation the string using switch case?
The % symbol has a special use in a printf statement. How would you place this character as part of the output on the screen?
Explain the meaning of keyword 'extern' in a function declaration.
Explain what is the purpose of "extern" keyword in a function declaration?
What does struct node * mean?
How can you be sure that a program follows the ANSI C standard?
What is memory leak in c?