Register Advertise with usHelp Desk Today's Posts Search

Thread Tools Search this Thread
Unread 12th Aug 2015, 07:49 AM   #1
Warrior Member
 
Join Date: 2012
Posts: 12
Thanks: 4
Thanked 2 Times in 1 Post
Default
Anyone please explain this???
Share on: 
fb share twitter share gplus share more share

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
kaputchnik is offline   Reply With Quote
Unread 12th Aug 2015, 11:18 AM   #2
HyperActive Warrior
Registered Member
 
Join Date: 2013
Posts: 103
Thanks: 4
Thanked 4 Times in 4 Posts
Default
Re: Anyone please explain this???
Share on: 
fb share twitter share gplus share more share

A=20
B=20

The variables will be equal to the last number assigned to them.
The Stardust Traveler is offline   Reply With Quote
Unread 12th Aug 2015, 06:06 PM   #3
Bananas are Yellow!
Registered Member
War Room Member
 
David Beroff's Avatar
 
Join Date: 2013
Location: Wyoming, PA, USA
Posts: 1,046
Thanks: 2,549
Thanked 1,600 Times in 928 Posts
Blog Entries: 4
Default
Re: Anyone please explain this???
Share on: 
fb share twitter share gplus share more share

So where do you go to school?

Put MY voice on YOUR video: AwesomeAmericanAudio.com
David Beroff is offline   Reply With Quote
Unread 13th Aug 2015, 04:39 AM   #4
VIP Warrior
War Room Member
 
Join Date: 2006
Location: , , USA.
Posts: 1,795
Thanks: 70
Thanked 287 Times in 259 Posts
Default
Re: Anyone please explain this???
Share on: 
fb share twitter share gplus share more share

Originally Posted by David Beroff View Post

So where do you go to school?
If he couldn't figure that out, I don't think he does go to school.
KirkMcD is offline   Reply With Quote
Unread 13th Aug 2015, 05:02 AM   #5
Bananas are Yellow!
Registered Member
War Room Member
 
David Beroff's Avatar
 
Join Date: 2013
Location: Wyoming, PA, USA
Posts: 1,046
Thanks: 2,549
Thanked 1,600 Times in 928 Posts
Blog Entries: 4
Default
Re: Anyone please explain this???
Share on: 
fb share twitter share gplus share more share

Originally Posted by KirkMcD View Post

If he couldn't figure that out, I don't think he does go to school.
Maybe I was being too subtle. I was trying to imply that he was asking us to do his homework for him.

Put MY voice on YOUR video: AwesomeAmericanAudio.com
David Beroff is offline   Reply With Quote
Unread 13th Aug 2015, 08:53 AM   #6
VIP Warrior
War Room Member
 
Join Date: 2006
Location: , , USA.
Posts: 1,795
Thanks: 70
Thanked 287 Times in 259 Posts
Default
Re: Anyone please explain this???
Share on: 
fb share twitter share gplus share more share

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.
KirkMcD is offline   Reply With Quote
Unread 17th Aug 2015, 09:58 PM   #7
Warrior Member
 
Join Date: 2015
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default
Re: Anyone please explain this???
Share on: 
fb share twitter share gplus share more share

Answer is 3rd Option from the given above list. B is getting assigned to A, since assignment operator is used.
PriyaJayaraman is offline   Reply With Quote
Unread 22nd Aug 2015, 10:04 AM   #8
Warrior Member
 
Join Date: 2015
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default
Re: Anyone please explain this???
Share on: 
fb share twitter share gplus share more share

A = 30, B = 0 <-- i am pretty sure this would return a syntax error

smilesumo is offline   Reply With Quote
Unread 5th Feb 2018, 10:44 AM   #9
Warrior Member
 
Join Date: 2018
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default
RE: Anyone please explain this???
Share on: 
fb share twitter share gplus share more share

Step 3 made the variable constant
A = 10, B = 20 that is right
yaser abu sh
yaser3bed is offline   Reply With Quote
Unread 7th Feb 2018, 06:18 AM   #10
New Warrior Member
 
Join Date: 2018
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default
RE: Anyone please explain this???
Share on: 
fb share twitter share gplus share more share

A=20 and B=20
ruchi chouhan is offline   Reply With Quote


Bookmarks

Tags
explain


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




All times are GMT -6. The time now is 01:47 AM.