how to swap two integers 1 and 32767 without using third
variable
Answer Posted / vidhubala-j
int a=1
int b=32767
a^=b^=a
printf("%d %d",a,b);
| Is This Answer Correct ? | 4 Yes | 3 No |
Post New Answer View All Answers
Why is it usually a bad idea to use gets()? Suggest a workaround.
Explain what is #line used for?
a number whose only prime factors are 2,3,5, and 7 is call humble number,,write a program to find and display the nth element in this sequence.. sample input : 2,3,4,11,12,13, and 100.. sample output : the 2nd humble number is 2,the 3rd humble number is 3,the 4th humble number is ,the 11th humble number is 12, the 12th humble number is 14, the 13th humble number is 15, the 100th humble number is 450.
Synonymous with pointer array a) character array b) ragged array c) multiple array d) none
Given only putchar (no sprintf, itoa, etc.) write a routine putlong that prints out an unsigned long in decimal. [ I gave the obvious solution of taking % 10 and / 10, which gives us the decimal value in reverse order. This requires an array since we need to print it out in the correct order. The interviewer wasn't too pleased and asked me to give a solution which didn't need the array ].
What is array within structure?
write a program in C that prompts the user for today's date,tomorrow's date and display the results.Use structures for today's date,tomorrow's date and an array to hold the days for each month of the year.
What are the different types of linkage exist in c?
Write a program that accept anumber in words
What is variable and explain rules to declare variable in c?
How can I avoid the abort, retry, fail messages?
What is the main difference between calloc () and malloc ()?
When we use void main and int main?
Is multithreading possible in c?
Is c is a procedural language?