swap two number wthout using third variable
Answer Posted / ashutosh tiwari
void swap_num(int *a, int *b)
{
*a = *a+*b; *b = *a-*b; *a = *a-*b;
}
or
void swap_num(int *a,int *b)
{
*a = *a^*b; *b = *a^*b; *a = *a^*b;
}
| Is This Answer Correct ? | 8 Yes | 0 No |
Post New Answer View All Answers
which book we learned this mantis? how many version are realsed this mantis upto now?
Given an array all of whose elements are positive numbers, find the maximum sum of a subsequence with the constraint that no 2 numbers in the sequence should be adjacent in the array. So 3 2 7 10 should return 13 (sum of 3 and 10) or 3 2 5 10 7 should return 15 (sum of 3, 5 and 7)
when a query is made on Logical file in DB2/400, will the records satisfying select/omit criterion be fetched from all members of physical file or only the member with same name as physical file?
Diff between IF and where ?
Suppose server object is not loaded into the memory, and the client request for it , what will happen?
where is available in this mantis toturials?
what is adodb??y it is used for connection of V.B and access??what is ado?dao?
write the a cl program with the following specification A. Accept 2 parameters-date and date type B. if date type is J then convert date to *MDY format C. if date type is M convert date to *JUL format 4.send a program message with the value of converted date Please explain for each with coding?
what is difference between kpo and it industry? that is in terms of work, package etc
what are stubs related to foxpro?
WHAT IS MAIN IMPORTANT THING IN SOFTWARE?
Hi can you please send me recent(present) interview questions and technical qyestions with answers for "BUSSIESS OBJECTS" and "DATA WAREHOUSE".pls its urgent for me my mail id is sekhar.cs82@gmail.com,manjuforgis@gmail.com. thanks in advance
hi viewers, tell me,what is scripting and programming, define and difference...pls
How will you prove that java swing is multithreaded?
what is the use MDM(Master Data Management)and meaning