How to swap values between two variables without using a
third variable?
Answer Posted / vinodkumar
main()
{
int a=10,b=8;
void swap(a,b)
/*it does not return any value because return statement can
return only one value at a time*/
{
a=a+b;/*a=10+8,a=18*/
b=a-b;/*b=18-8,b=10*/
a=a-b;/*a=18-10,a=8*/
printf("after swaping a= %dand b=%d",&a,&b);
}
getch()
}
| Is This Answer Correct ? | 5 Yes | 2 No |
Post New Answer View All Answers
Hi all... I had completed MSC(Computer) and had join the construction company based on sap.they want me to work on abap.but software company is totally different from construction company and they want me 2 grasp it as fast i can.i am finding it difficult.what should i do??????
One boy has to climb steps. He can climb 1 or 2 steps at a time. Write a function that will returns number of way a boy can climb the steps. Int WaytoSteps(int n) (eg:- suppose number of steps is n=4 ,the function will return 5 (one-one-one-one ,one-one-two, one-two-one-,two-one-one, two-two)
How to call a C++ function which is compiled with C++ compiler in C code?
code for connection from windows forms to sql server
What do you understand by modular programming?
It is possible to take number of controls added to form at run-time.ex-when user enter 6, 6 text boxes get added to form,next time number of controls get change as per user number enter. What is code for that?
Code for display the images from drive using vb 6.0?
How does the TCP handle the issue of multiplexing?
What for decision coverage and modified condition decision coverage are used? Wat is the difference between them?
WS-NUM PIC S9(05)V(02) SIGN TRAILING SEPARATE MOVE '0050000+' TO WS-NUM The value stored is 00500,00+ MOVE '0050000-' TO WS-NUM Then what is the value will be stored in WS-NUM? Am getting '-00500,00'.....>>> What should I declare to WS-NUM so that I can get correct values for both + & - signs.
Find out the roles which gives access to all tables in SAP? Thanks in advance.
what is difference between kpo and it industry? that is in terms of work, package etc
4. What is the need of START 0? Instead if can we use any other numeric? If we use what will happen?
Given: coordinates of rectangle-> left bottom and right top points. the rectangles create a hole.Find the maximum area of the hole. eg. 4 rectangles create a hole in between. find its area.
which worker is involved in all the phases of SDLC?