C++: Test 2 - Online Test

Test Difficulty Level: Medium

Syllabus of Test

Computer Science: Questions from the programming language, C++

Sample Question from this online test:

Question: If p & q are int type variables, what will be the result of the expression
p % q
Where p=-16 and q=-3

Option A: 1

Option B: -1

Option C: 5

Option D: -5

To answer, click the "Start This Test" button below.

Start this Test






Comments

ajay awasthi on 2010-11-13 05:42:46 wrote,

please update question no 1 and 20 answer these are (A) 1.

Siddique Akbar on 2011-01-01 10:16:46 wrote,

Q:3 a function body should be enclosed in {}. plz do mention it in the code

Nitesh Kumar on 2011-08-28 11:50:34 wrote,

good

fenam m on 2011-08-29 10:21:26 wrote,

ah opikaaaam

Yellaiah B on 2012-03-12 10:24:54 wrote,

8th answer should be 121...

Sunil bhamare on 2012-04-02 10:13:31 wrote,

Que no1 and que no 20 are same.

mridu sahu on 2012-12-07 10:13:00 wrote,

8th answer should be 121

jack liu on 2015-06-25 05:13:47 wrote,

the answer to question 1 and 20 is right, p % q means p - ( p / q ) * q. so replacing the variables p and q with the values -16 and 3, the answer is -1.