GeekInterview.com
Home
Tech Articles
Code Samples
Learn
Freelance Projects
Online Testing
Geek Talk
Job Postings
Knowledge Base
Geek Blogs
Question Bank
Interview Questions
Certification
Placement Papers
Tech FAQ
Career Advice
Engineering
Ask Question
I am new,
Sign me up!
User Name
Remember Me?
Password
Interview Questions
Certification
Placement Papers
Tech FAQ
Career Advice
Engineering
Ask Question
GeekInterview.com
>
Interview Questions
>
Microsoft
>
C#
Go To First
|
Previous Question
|
Next Question
C#
| Question 403 of 436
Print
Value of x
This is interview question,
public void A()
{
int x;
x = 8;
x *= 4 + 8 / 2;
}
Given the above code, what is the value of "x"?
options:- A) 3
B) 2
C)4
D) None
Total Answers and Comments:
7
Last Update: May 30, 2008 Asked by:
nithya R
Sponsored Links
Best Rated Answer
—
No best answer available. Please pick the good answer available or
submit
your answer.
January 27, 2008 18:42:49
#1
nikhilbandodkar
Member Since: January 2008 Contribution: 2
RE: Value of x
The answer is 64
Is this answer useful?
Yes
|
No
January 28, 2008 08:45:14
#2
nithya R
Member Since: December 2007 Contribution: 7
RE: Value of x
Can u explain how you get 64 ?
Is this answer useful?
Yes
|
No
January 28, 2008 09:37:51
#3
studentmca2007
Member Since: March 2007 Contribution: 1
RE: Value of x
The answer is '64'
Is this answer useful?
Yes
|
No
January 28, 2008 10:47:35
#4
nikhilbandodkar
Member Since: January 2008 Contribution: 2
RE: Value of x
x * 4 + 8/2 is equivalent to x x * (4 + 8/2)
This equates to x x * (4 + 4) /* the division operation is carried out prior to the addition operation */
Which is nothing but x 8 * 8 > 64
Is this answer useful?
Yes
|
No
February 04, 2008 01:49:48
#5
pritam83
Member Since: September 2007 Contribution: 5
RE: Value of x
The Answer is 64
Is this answer useful?
Yes
|
No
May 07, 2008 04:45:42
#6
ushalakshmi
Member Since: April 2008 Contribution: 40
RE: Value of x
Value of X is 64
Is this answer useful?
Yes
|
No
May 30, 2008 07:05:49
#7
abha2584
Member Since: May 2008 Contribution: 1
RE: Value of x
Answer is 64
Is this answer useful?
Yes
|
No
Go To Top
Sponsored Links
Related Categories
—
ADO.NET Interview Questions
ADO.NET 2.0 Interview Questions
Architecture Interview Questions
ASP Interview Questions
ASP.NET Interview Questions
ASP.NET 2.0 Interview Questions
Microsoft.NET Interview Questions
C# Interview Questions
DataGrid Interview Questions
DotNet Interview Questions
Microsoft.NET 2.0 Interview Questions
Microsoft Basics Interview Questions
Reporting Services Interview Questions
VB.NET Interview Questions
Visual Basic Interview Questions
Sponsored Links
Featured Free Offers
Request Your Copy
Request Your Copy
Request Your Copy
About Us
-
Privacy Policy
-
Terms and Conditions
-
Contact
-
Ask Question
-
Propose Category
-
Site Updates
Copyright © 2005 - 2009 GeekInterview.com. All Rights Reserved