![]() |
Anyone please explain this??? Here is a series of three steps: Step 1: A = 10 Step 2: B = 20 Step 3: A = B A and B are variables, that is they can stand for any value. The "=" sign stands for assignment. It means "assign the value on the right to the variable on the left". After all three steps above have been completed, what are the values of A and B? * A = 30, B = 0 A = 30, B = 20 A = 20, B = 20 A = 20, B = 0 A = 10, B = 10 A = 10, B = 20 A = 20, B = 10 A = 0, B = 10 |
Re: Anyone please explain this??? A=20 B=20 The variables will be equal to the last number assigned to them. |
Re: Anyone please explain this??? So where do you go to school? |
Re: Anyone please explain this??? Quote:
|
Re: Anyone please explain this??? Quote:
|
Re: Anyone please explain this??? I think I was a bit more subtle than you, in that I pretty much just called him (and I'm going to be subtle again) not very smart. |
Re: Anyone please explain this??? Answer is 3rd Option from the given above list. B is getting assigned to A, since assignment operator is used. |
Re: Anyone please explain this??? A = 30, B = 0 <-- i am pretty sure this would return a syntax error :D |
RE: Anyone please explain this??? Step 3 made the variable constant A = 10, B = 20 that is right yaser abu sh |
RE: Anyone please explain this??? A=20 and B=20 |
| All times are GMT -6. The time now is 04:40 AM. |