write a program in C to swap two variables
Answer Posted / srinivas
#include <stdio.h>
int main(void)
{
int a = 2, b = 5;
a = a + b;
b = a - b;
a = a - b;
printf("%d\t%d\n", a, b);
return 0;
}
| Is This Answer Correct ? | 2 Yes | 0 No |
Post New Answer View All Answers
write a C program: To search a file any word which starts with ?a?. If the word following this ?a? starts with a vowel.Then replace this ?a? with ?a? with ?an?. redirect with the output onto an output file.The source file and destination file are specified by the user int the command line.
any "C" function by default returns an a) int value b) float value c) char value d) a & b
Write a program of prime number using recursion.
What is the value of a[3] if integer a[] = {5,4,3,2,1}?
What is c definition?
Write a program to reverse a given number in c?
Can you think of a logic behind the game minesweeper.
What is identifiers in c with examples?
Write a program to swap two numbers without using third variable?
What are the 5 types of inheritance in c ++?
Draw a flowchart to produce a printed list of all the students over the age of 20 in a class .The input records contains the name and age of students. Assume a sentinel value of 99 for the age field of the trailer record
What will the preprocessor do for a program?
Can 'this' pointer by used in the constructor?
Give a one-line C expression to test whether a number is a power of 2. [No loops allowed - it's a simple test.]
Can you write the function prototype, definition and mention the other requirements.