Friday, July 31, 2009

Which is the INCORRECT statement?

a. The expression abc+=25 adds 25 to the previous valueof the variable abc.





b. An expression in C is a combination of operators and operands that performs a computation.





c. The assignment operator, = , in C and the equal sign in mathematics are the same.

Which is the INCORRECT statement?
c. = in C is an assignment, but == is the comparison.





( in math, = means that one value is the other )
Reply:I know that the last one is wrong in C++ and C#, "=" is C++ and C# means assing to, while if you want to know if two numbers are equal you should use "==".


The second one is alright, but I am not sure about the first one, but i think it's right too. ( Ihaven't used C++ and C# for good amount of time, so I am little rusty on sime details)
Reply:Are you just posing up questions from your homework or something? you've posted quite a few of these multiple choice conundrums today.


In response the correct answer would be c.





the eqal sign in mathematics is equal to "==" in c.


No comments:

Post a Comment