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
What are two of your strengths that you will bring to our QA/testing team?
If i have a dataset queried from Sql and I would like to insert the dataset into a specific node in an xml document how do I do this
how to generate dsnless connectivity in j2ee
details description on this mantis? who is founder of this mantis?
what are the advantages of sap on other software ?
Is class is a abstract datatype in java?
When we delete logfiles such as screenshots how does it affect the ldf file? Ive seen huge change while adding screenshots in the ldf file but a very minor one deleting them.Please Explain
Can i please VHDL code for D-Latch with clear input ?? (HINT: Set up a “Process” with appropriate sensitivity list to get the desired D-Latch with Clr working.) Inputs and Outputs: entity Lab4b is Port ( Clr, Clk, D : in STD_LOGIC; Q : out STD_LOGIC); end Lab4b;
how do we provide security for web services
how to add a new table with variables and thier values into a imported file uisng proc import?
What is the difference between WebIntelligence and Designer in creating universes?
Suppose server object is not loaded into the memory, and the client request for it , what will happen?
Wrtite a JCL for sorting a file with start from 36 postion lenth 9 excluding a num eq to 98768. for 3 marks mainframe
1.Mutating table
how CLR identify vb file?