Answer Posted / amaresh chandra das
amaresh@Hare-Krishna:~$ cat swp.c
#include<stdio.h>
int
main(){
int a=5,b=6; // Compile using gcc -Wall
#ifdef DEBUG // to avoid compiler warnings
a ^=b^=a^=b;
#endif
printf("value of a is %d and b is %d\n",a,b);
return 0;
}
| Is This Answer Correct ? | 2 Yes | 4 No |
Post New Answer View All Answers
What is FIFO?
What are header files and what are its uses in C programming?
A program is required to print your biographic information including: Names, gender, student Number, Cell Number, line of study and your residential address.
Given below are three different ways to print the character for ASCII code 88. Which is the correct way1) char c = 88; cout << c << " ";2) cout.put(88);3) cout << char(88) << " "; a) 1 b) 2 c) 3 d) constant
Explain what are header files and explain what are its uses in c programming?
Synonymous with pointer array a) character array b) ragged array c) multiple array d) none
What are the application of c?
Which of the following operators is incorrect and why? ( >=, <=, <>, ==)
What is LINKED LIST? How can you access the last element in a linked list?
What are identifiers in c?
cin.ignore(80, _ _);This statement a) ignores all input b) ignores the first 80 characters in the input c) ignores all input till end-of-line d) iteration
What the different types of arrays in c?
Which one would you prefer - a macro or a function?
Explain argument and its types.
Write the program with at least two functions to solve the following problem. The members of the board of a small university are considering voting for a pay increase for their 10 faculty members. They are considering a pay increase of 8%. Write a program that will prompt for and accept the current salary for each of the faculty members, then calculate and display their individual pay increases. At the end of the program, print the total faculty payroll before and after the pay increase, and the total pay increase involved.