|
|
Author | Message |
---|
Hari Active member
| Subject: Re: OUTPUT CONFUSION!! Sat Feb 21, 2009 2:12 am | |
| yes the answer is: 2 15 7 8 10 |
|
| |
akshay Active member
| Subject: Re: OUTPUT CONFUSION!! Sat Feb 21, 2009 2:20 am | |
| check the print statement:
System.out.println(arr[i]); ..its within the 'for' loop and 'i' starts from zero so the element within the array 'arr' at 0th position (i.e, 2) gets printed first. |
|
| |
siya Active member
| Subject: Re: OUTPUT CONFUSION!! Sat Feb 21, 2009 11:32 am | |
| arre anu,dis 2=arr[0].see in d whloe program arr[0] is untouched.n while printin in d end d loop is stratin frm 0 so first arr[0] will b printed which is 2.hope u got it!! |
|
| |
Anu..i luv icse...:) Active member
| Subject: Re: OUTPUT CONFUSION!! Sun Feb 22, 2009 12:38 am | |
| oh...k...Siya, as_24 and Hari ..thanks a lot ...got it!!! uffff!! at last... but, 1 thing.....will such questions come in board exam first section?? this is such a long one ...it will take time for us to evaluate!! |
|
| |
siya Active member
| Subject: Re: OUTPUT CONFUSION!! Sun Feb 22, 2009 12:41 am | |
| ya i think dat such qquestions can surely come |
|
| |
kanika rajput Active member
| Subject: Re: OUTPUT CONFUSION!! Sun Feb 22, 2009 1:21 pm | |
| ar[0] vill print =2 ar[1] vill print=15 den further how villl 7 ; 8 .10 vud be printed ????????? |
|
| |
siya Active member
| Subject: Re: OUTPUT CONFUSION!! Sun Feb 22, 2009 2:52 pm | |
| arre kanika c carefully dear ki at last while printin d loop is frm 0-5 ,i.e,arr[0],arr[1],arr[2],arr[3] n arr[4] all will b printed.throughout d course of d loop only arr[2] is changed frm 6 to 7.rest arr[3] n arr[4] r not changed newhere so de will b printed like dis only!! |
|
| |
kanika rajput Active member
| Subject: Re: OUTPUT CONFUSION!! Sun Feb 22, 2009 5:27 pm | |
| yaa got it....siya thanxxx............. |
|
| |
kanika rajput Active member
| Subject: Re: OUTPUT CONFUSION!! Wed Feb 25, 2009 12:16 pm | |
| HEYY FRNDZZZ PLZZZ TELL D OUTPUT OF D PROGRAM...........
a=5 b=9 a+ = a++ - ++b +a |
|
| |
siya Active member
| Subject: Re: OUTPUT CONFUSION!! Wed Feb 25, 2009 12:23 pm | |
| a=8 b=8 |
|
| |
Hari Active member
| Subject: Re: OUTPUT CONFUSION!! Wed Feb 25, 2009 2:15 pm | |
| no:::: a---6 b--10 |
|
| |
kanika rajput Active member
| Subject: Re: OUTPUT CONFUSION!! Wed Feb 25, 2009 3:46 pm | |
| wat is d final asnwer ofn all calculations.?????????????? wats end value of a??????????? |
|
| |
Hari Active member
| Subject: Re: OUTPUT CONFUSION!! Wed Feb 25, 2009 5:13 pm | |
| a---6 b---10......sure |
|
| |
kanika rajput Active member
| Subject: Re: OUTPUT CONFUSION!! Wed Feb 25, 2009 6:17 pm | |
| yaaarr tell answer after calculation........
matlab i mean......aaddd vich r to be added subtract required n den fnal output in 1 digit.............. |
|
| |
Anu..i luv icse...:) Active member
| Subject: Re: OUTPUT CONFUSION!! Wed Feb 25, 2009 6:31 pm | |
| a=5 b=9 a + = a++ - ++b +a a =a+ a++ - ++b +a =5+ 5 - 10 +6 a =6 b=10 |
|
| |
siya Active member
| Subject: Re: OUTPUT CONFUSION!! Wed Feb 25, 2009 8:09 pm | |
| yaaaaaaaaaaaa sure a=6 n b=10.....sorry kanika i thought --b instead of ++b....sorrrrrrry its 100% a=6 n b=10... |
|
| |
kanika rajput Active member
| Subject: Re: OUTPUT CONFUSION!! Wed Feb 25, 2009 9:27 pm | |
| thanxx frndzzz....... |
|
| |
Sponsored content
| Subject: Re: OUTPUT CONFUSION!! | |
|
|
|
| |
|