write a program to swap Two numbers without using temp variable.
Answer Posted / prudhvi
int a, b, c;
a = int.Parse(Console.ReadLine());
b = int.Parse(Console.ReadLine());
c = b;
b = a;
a = c;
Console.WriteLine("a={0},b={1}",a,b);
Console.ReadLine();
}
Is This Answer Correct ? | 0 Yes | 2 No |
Post New Answer View All Answers
Explain how can I manipulate strings of multibyte characters?
What is #line?
What is the purpose of & in scanf?
What does the c preprocessor do?
What is queue in c?
Explain Function Pointer?
Why void main is used in c?
What type is sizeof?
how to find binary of number?
What is hash table in c?
write a program to print data of 5 five students with structures?
What is a nested formula?
Study the following C program :call_me (myvar)int myvar;{ myvar +- 5; }main(){int myvar;myvar = 3;call_me(myvar);printf("%d ",myvar);What will be printed a) 3 b) 5 c) 8 d) symbol
Explain why can’t constant values be used to define an array’s initial size?
regarding pointers concept