All mock tests are FREE till 31 December — register to save your progress
Paper 2 CS · UNIT 03 · MOCK TEST

Programming Languages and Computer Graphics — Mock Test 4

25 questions · about 30 minutes. Press End Mock any time to see your score and the correct answers.

0 / 25 answered 00:00
Q1. Which of the following are correct uses of std::string constructors?
A. string s1;
B. string s2(s1);
C. string s3{7};
D. string s4{'a'};
E. string s5{7, 'a'};
Choose the most appropriate answer from the options given below:
Q2. A corporate website's appearance varies according to the department that owns the documents, but all documents follow the corporate look and feel. The HR department does not need a separate style sheet; it needs only a sheet containing the differences from the corporate sheet. Which statements justify this scenario?
A. Style sheets cannot stack on each other
B. Style sheets can stack on each other
C. Style sheets can override each other
D. Style sheets cannot override each other
Choose the most appropriate answer from the options given below:
Q3. Match List I with List II
List IList II
A. 2-D Array InputI. Liquid Crystal Display
B. Transmissive deviceII. Flat-bed scanner
C. Binary imageIII. Camera
D. 1-D Array inputIV. Inkjet printer
Q4. Consider the following conditional code, which returns a Boolean value:
if ((x > 25) && (y > 100))
    return 'false';
else if ((x <= 25) && (y <= 100))
    return 'true';
else if ((x > 25) && (y <= 100))
    return 'false';
else
    return 'true';
Simplify it by filling in the blank with a single Boolean expression without changing the behaviour of the code:
if ( ________ )
    return 'true';
else
    return 'false';
Q5. Machine level language is a/an
Q6. Which of the following is wrong about data types?
Q7. If a constructor 'Date' is declared explicit and has to be defined outside the class, which of the following is correct?
Q8. Which one of the following allows the session to continue?
Q9. Given a vector with Cartesian components (x, y), if scaling is done with the matrix [[0.5, 0], [0, 1.5]], which of the following are true?
1. Decreases the vertical by three halves
2. Increases the vertical by three halves
3. Doubles the horizontal
4. Halves the horizontal
Choose the correct answer from the options given below:
Q10. Which of the following lists defined in HTML share a similar element?
1. Unordered lists
2. Ordered lists
3. Definition lists
4. Correlated lists
5. Enumerated lists
Choose the most appropriate answer from the options given below:
Q11. Match List I with List II.
Choose the correct answer from the options given below:
List IList II
a. If the implementation of generated or derived classes differs only through a parameter, we haveI. to use a class hierarchy
b. If the actual types of objects used cannot be known at compile time, we haveII. improved run-time efficiency
c. If inline operations are essential and templates are used, we haveIII. to use templates
d. To gain access to differing instances of derived classes through a base, we haveIV. to use explicit casting
Q12. In what sequence are initialisation, testing and execution of the body done in a do-while loop?
I. Commenting
II. Execution of the body
III. Initialisation
IV. Testing the condition
Q13. Assertion A: A raster-scan device is a CRT graphics device and can use a television monitor for display.
Reason R: In a raster-scan display the picture is composed of a series of dots traced out as horizontal lines. Television works in a similar fashion.
Choose the correct answer.
Q14. The hidden-surface removal problem with a minimal 3D pipeline can be solved with
Q15. The condition num != 65 cannot be replaced by
Q16. Pointers cannot be used to
Q17. Which mechanism in XML allows organisations to specify globally unique names as element tags in documents?
Q18. The following transformation (with general entries in all four rows) is called
[x']   [a1 b1 c1 d1] [x]
[y'] = [a2 b2 c2 d2] [y]
[z']   [a3 b3 c3 d3] [z]
[w']   [e  f  g  h ] [1]
Q19. A top-down approach to programming calls for:
Statement I: Working from the general to the specific.
Statement II: Postponing the minor decisions.
Statement III: A systematic approach.
Statement IV: Intermediate coding of the problem.
Which of the following is true?
Q20. Which of the following is NOT a logical error?
Q21. Which statement is false?
Q22. The steps for analysis and design of object oriented system:
(A) Draw interaction diagrams
(B) Draw state chart and object diagram
(C) Draw use case and activity diagram
(D) Draw component and deployment diagram
(E) Draw class diagram
Q23. Given below are two statements:
Assertion A: Cohesion is a qualitative indication of the degree to which a module can be written more compactly and is able to complete its function in a timely manner.
Reason R: Cohesion is a qualitative indication of the degree to which a module is connected to other modules and the outside world.
In the light of the above statements, choose the correct answer from the options given below:
Q24. Modules X and Y operate on the same input and output, then the cohesion is
Q25. Arrange the following types of Cohesion from best to worst type.
A. Logical Cohesion
B. Sequential Cohesion
C. Communication Cohesion
D. Temporal Cohesion
E. Procedural Cohesion
Choose the correct answer from the options given below: