COMP1205 Computing 1 Past Paper 2023 PDF

Document Details

BrightBlueTourmaline4442

Uploaded by BrightBlueTourmaline4442

The University of the West Indies

2023

The University of The West Indies

Tags

computing programming c++ computer science

Summary

This is a Computing 1 past paper from The University of The West Indies, 2023. The paper is for an undergraduate level course and includes multiple choice and programming questions.

Full Transcript

THE UNIVERSITY OF THE WEST INDIES EXAMINATIONS OF APRIL-MAY 2023 Code and Name of Course: COMP1205 – COMPUTING 1 Date and Time: Duration: 2 HOURS INSTRUCTIONS TO CANDIDATE: This paper has 6 pa...

THE UNIVERSITY OF THE WEST INDIES EXAMINATIONS OF APRIL-MAY 2023 Code and Name of Course: COMP1205 – COMPUTING 1 Date and Time: Duration: 2 HOURS INSTRUCTIONS TO CANDIDATE: This paper has 6 pages and 2 sections. Section A comprises multiple-choice questions and Section B comprises programming questions. Answer ALL questions. Total [60 Marks]. SECTION A [15 Marks] Multiple Choice Questions 1. Which of the following is a structured programming technique that graphically represents the detailed steps required to solve a program? a. Object-oriented programming b. Pseudocode c. Flowchart d. Top-down design 2. Which of the following comment syntax is correct to create a single-line comment in the C++ program? a. //Comment b. c. Comment// d. None of the above 3. A function prototype can always be omitted when: a. A function is defined before it is first invoked. b. A function is invoked before it is first defined. c. A function takes no arguments. d. A function does not return a value. Page 1 of 6 The University of the West Indies __________________________________________________________________________________________________ DO NOT WRITE OR TYPE ON THE BACK OF THIS SHEET: USE ONE SIDE ONLY INSTRUCTIONS: Each page must be signed by the FIRST AND SECOND EXAMINERS. Completed forms should be handed to the Assistant Registrar (Examinations). ……………………............. ……………………............. First Examiner Second Examiner Date: 2023/…03…/…28… Date: 2023/……/…… 4. Which one of the following is not a common method of solving a problem in computer science? a. trial and error b. inductive analysis c. difference reduction d. means-ends analysis 5. Which of the following statements correctly declare an array called "students" of 4 elements type string and initialize the elements to Richard, Elizabeth, Jordan, and Jose? a. string students = { "Richard", "Elizabeth", "Jordan", "Jose"}; b. students[ ] = { "Richard", "Elizabeth", "Jordan", "Jose"}; c. int students = { "Richard", "Elizabeth", "Jordan", "Jose"}; d. string students = { Richard, Elizabeth, Jordan, Jose}; 6. Which of the following statements correctly declares an array of type int "arr" that has 15 elements and displays each element in the array? a. arr; for (i = 0; i < 15; i++) { cout

Use Quizgecko on...
Browser
Browser