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 the difference between call by value and call by reference in c language?
What are the 4 data types?
What is FIFO?
What is the purpose of clrscr () printf () and getch ()?
Can you assign a different address to an array tag?
please give me a VIRTUSA sample palcement papers.... you will only send TECHNICAL SECTION..... that is help for me Advance Thanks........................
What is restrict keyword in c?
Write a program to generate random numbers in c?
Are the outer parentheses in return statements really optional?
how many types of operators are include in c language a) 4 b) 6 c) 8 d) 12
The purpose of this exercise is to benchmark file writing and reading speed. This exercise is divided into two parts. a). Write a file character by character such that the total file size becomes approximately >10K. After writing close the file handler, open a new stream and read the file character by character. Record both times. Execute this exercise at least 4 times b). Create a buffer capable of storing 100 characters. Now after generating the characters, first store them in the buffer. Once the buffer is filled up, store all the elements in the file. Repeat the process until the total file size becomes approximately >10K.While reading read a while line, store it in buffer and once buffer gets filled up, display the whole buffer. Repeat the exercise at least 4 times with different size of buffer (50, 100, 150 …). Records the times. c). Do an analysis of the differences in times and submit it in class.
Explain the difference between null pointer and void pointer.
What are lookup tables in c?
What is void main () in c?
Explain how does free() know explain how much memory to release?