Write a program to exchange two variaables without temp
Answer Posted / sujith
another quick way is,
void main()
{
int a = 10, b = 5;
a ^= b ^= a ^= b;
}
Is This Answer Correct ? | 7 Yes | 0 No |
Post New Answer View All Answers
Using which language Test cases are added in .ptu file of RTRT unit testing???
What is malloc and calloc?
What is the difference between a function and a method in c?
What is #ifdef ? What is its application?
What is the function of volatile in c language?
Write a simple code fragment that will check if a number is positive or negative.
What library is sizeof in c?
What is ctrl c called?
Explain what is the difference between #include and #include 'file' ?
What does malloc () calloc () realloc () free () do?
what is use of malloc and calloc?
a) Identify the following declarations. Ex. int i (integer variable) float a[l0](array of 10 real nos) int (*f())() void *f int (*f()) [] void *f int f[] [] [] char *(*f) () int (*f[]) [] float(*f) [] [] float **f int ******f
GIven a sequence of characters. How will you convert the lower case characters to upper case characters. ( Try using bit vector - sol given in the C lib -> typec.h)
The program will first compute the tax you owe based on your income. User is prompted to enter income. Program will compute the total amount of tax owed based on the following: Income Tax 0 - $45,000 = 0.15 x income $45,001 - $90,000 = 6750 + 0.20 x (income – 45000) $90,001 - $140,000 = 15750 + 0.26 x (income – 90000) $140,001 - $200,000 = 28750 + 0.29 x (income – 140000) Greater than $200,000 = 46150 + 0.33 x (income – 200000) Dollar amounts should be in dollars and cents (float point numbers with two decimals shown). Tax is displayed on the screen.
How do I determine whether a character is numeric, alphabetic, and so on?