adspace
Create a simple code fragment that will swap the values of two variables num1 and num2.
Answer Posted / Nandan Singh
In C, you can use a temporary variable to swap the values of two variables like so:n`n int temp = num1;n num1 = num2;n num2 = temp;n`
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
Explain the difference between null pointer and void pointer.
Is int a keyword in c?
What is the difference between union and anonymous union?
what is associativity explain what is the precidence for * and & , * and ++ how the folloing declaration work 1) *&p; 2) *p++;
What is the general form of a C program?
What are pointers? What are different types of pointers?
What are compound statements?
hi send me sample aptitude papers of cts?
List at least 10 sorting methods indicating their average case complexity, worst case complexity and best case complexity.
Can a function be forced to be inline? Also, give a comparison between inline function and the C macro?
write a c program to find the sum of five entered numbers using an array named number
hi folks i m approching for h1 b interview on monday 8th of august at montreal and i m having little problem in my approval notice abt my bithdate my employer has made a mistake while applying it is 12th january and istead of that he had done 18 the of january do any body have any solution for that if yes how can i prove my visa officer abt my real birthdate it urgent please let me know guys thaks dipesh patel
How do you determine the length of a string value that was stored in a variable?
what is associativity explain what is the precidence for * and & , * and ++ how the folloing declaration work 1) *&p; 2) *p++;
The % symbol has a special use in a printf statement. How would you place this character as part of the output on the screen?