Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

HP PLACEMENT PAPERS -------- Placement Paper 1

Answer Posted / akshatha shetty

# define swap(a,b) temp=a; a=b; b=temp;
main( )
{

int i, j, temp;
i=5;
j=10;
temp=0;
if( i > j)
swap( i, j );
printf( "%d %d %d", i, j, temp);
}
ans: 10 0 0
b'coz swap(i,j) replaced wid the #define code,
temp=a;
a=b;
b=temp;
since if condition is false t skips first line..
so a=10, b=0, temp=0;

Is This Answer Correct ?    3 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

my question is : reverse a string in COBOL program (please write a code asap) input file: 1234abcdef abc*$#1___ cdef____ghi a_z_k_h___ 4_3_2_1___ ______5678 output file: 8765_____ 1_2_3_4__ h_k_z_a__ ihg____ghi 1#$*cba__ fedcb4321

1770


printf("%d",printf("%d",printf("%d",printf("%s","ILOVECPROGRAM")))); whats the output

1973


what is difference between uv and visible spectroscopy and how to differentiate the drug compounds in uv visible region

2127


your project to describe and tell about : 1. My favorite things 2. My favorite places at home 3. Animals *Choose one of them to describe *Write on your paper *If you done, Send me *Did you get it

1287


Danlaw placement questions and answers

1881


how did you celebrate your last birthday?

1803


i want the sample placement paper of goldman sachs urgently. please send it to me

4427


what is bidirectional?

1895


Hi.. Guys Im pranitha, presently im working in a organisation & im look for job at MNC's like DELL, Delloitte, Bank of America, Genpect, etc., I have completed B.com . Pls help me...

1646


Give me Medha Sevo previous written test question papers

1874


aptitude

1150


what is placement paper?

2661


What kind of Issues/bugs arise in ETL projects? I would like to know few issues (critical to somewhat bugs ) normally occur in ETL process especially when testing? Domains can be banking, retail or any.

1918


If anybody knows the recruitment procedure of IOTL & POWER MECHANICAL. send me the placement papers if u hav... very urgent ...

4404


why didn't get placed so far?

1709