Page 2 of 16<123412>Last » Show 40 post(s) from this thread on one page

Go4Expert (http://www.go4expert.com/)
-   C (http://www.go4expert.com/articles/c-tutorials/)
-   -   100 Multiple choice questions in C (http://www.go4expert.com/articles/100-multiple-choice-questions-c-t1373/)

 shabbir 10Apr2007 08:27

Re: 100 Multiple choice questions in C

 Dark_Knight 10Apr2007 21:32

Re: 100 Multiple choice questions in C

There are quite a few question which I dont know how to solve, so I needed answers for those

 shabbir 10Apr2007 21:45

Re: 100 Multiple choice questions in C

Quote:
 Originally Posted by Dark_Knight There are quite a few question which I dont know how to solve, so I needed answers for those
You can always discuss them in the forums (Unless you get the answers.)

 Dark_Knight 13Apr2007 22:06

Re: 100 Multiple choice questions in C

How do u solve this?

/*question number 97*/

Code:

int m = -14;
int n = 6;
int o;
o = m % ++n;
n += m++ - o;
m <<= (o ^ n) & 3;
Assuming two's-complement arithmetic, which one of the following correctly represents the values of m, n, and o after the execution of the code above?
Choice 1
m = -26, n = -7, o = 0
Choice 2
m = -52, n = -4, o = -2
Choice 3
m = -26, n = -5, o = -2
Choice 4
m = -104, n = -7, o = 0
Choice 5
m = -52, n = -6, o = 0

 shabbir 14Apr2007 00:20

Re: 100 Multiple choice questions in C

o = -14 % 7 = 0
n = 7 + (-14) - 0 = -7 which concludes the result.

 Dark_Knight 14Apr2007 02:58

Re: 100 Multiple choice questions in C

Thanks!!

 Dark_Knight 14Apr2007 04:25

Re: 100 Multiple choice questions in C

*question number 75*/
Which one of the following is true for identifiers that begin with an underscore?
Choice 1
They are generally treated differently by preprocessors and compilers from other identifiers.
Choice 2
They are case-insensitive.
Choice 3
They are reserved for usage by standards committees, system implementers, and compiler engineers.
Choice 4
Applications programmers are encouraged to employ them in their own code in order to mark certain symbols for internal usage. Choice 5
They are deprecated by Standard C and are permitted only for backward compatibility with older C libraries.

 Dark_Knight 14Apr2007 04:26

Re: 100 Multiple choice questions in C

Sorry, I think its 4

 shabbir 14Apr2007 06:09

Re: 100 Multiple choice questions in C

Quote:
 Originally Posted by Dark_Knight Sorry, I think its 4
:rolleyes: