# 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

## Related Online Tests:

## Comments

ajay awasthi on please update question no 1 and 20 answer these are (A) 1. | |

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

Nitesh Kumar on good | |

fenam m on ah opikaaaam | |

Yellaiah B on 8th answer should be 121... | |

Sunil bhamare on Que no1 and que no 20 are same. | |

mridu sahu on 8th answer should be 121 | |

jack liu on 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. |