Written by students who passed Immediately available after payment Read online or as PDF Wrong document? Swap it for free 4,6 TrustPilot
logo-home
Exam (elaborations)

COS1511 ASSIGNMENT 3 SOLUTIONS 2023

Rating
-
Sold
1
Pages
67
Grade
A+
Uploaded on
06-09-2023
Written in
2023/2024

COS1511 ASSIGNMENT 3 SOLUTIONS 2023

Content preview

9/6/23, 12:27 PM Assessment 3: Attempt review




COS1511-23-Y  Welcome to COS1511 Module Site  Assessment 3

QUIZ




Started on Wednesday, 6 September 2023, 11:52 AM
State Finished
Completed on Wednesday, 6 September 2023, 12:25 PM
Time taken 33 mins 30 secs
Marks 58.00/60.00
Grade 96.67 out of 100.00




https://mymodules.dtls.unisa.ac.za/mod/quiz/review.php?attempt=13064786&cmid=738305 1/67

,9/6/23, 12:27 PM Assessment 3: Attempt review


Question 1 Which of the following statements declares a one-dimensional
Correct array called letters to contain the first five lowercase letters of
Mark 1.00 out of the alphabet.
1.00

a. char letters[5] = {'a', 'b', 'c', 'd', 'e'}; 
char letters[5] = {'a', 'b', 'c', 'd', 'e'};


b. char letters[5] = {"a", "b", "c", "d", "e"};


c. char letters[5] = {'a'; 'b'; 'c'; 'd'; 'e'};


d. char letters[5] = {"a"; "b"; "c"; "d"; "e"};




Your answer is correct.
The correct answer is:
char letters[5] = {'a', 'b', 'c', 'd', 'e'};
char letters[5] = {'a', 'b', 'c', 'd', 'e'};




https://mymodules.dtls.unisa.ac.za/mod/quiz/review.php?attempt=13064786&cmid=738305 2/67

,9/6/23, 12:27 PM Assessment 3: Attempt review


Question 2 Given the array declaration below and user prompt, which
Correct statement will place the number 1 into the first array element
Mark 1.00 out of using the extraction operator.
1.00
int numbers[5] = {0};
cout << “Enter the first number: “;




a. cin >> numbers[1];

b. cin >> numbers[0] + 1;

c. cin >> numbers[0] = 1;

d. cin >> numbers[0]; 




Your answer is correct.

The correct answer is:
cin >> numbers[0];




https://mymodules.dtls.unisa.ac.za/mod/quiz/review.php?attempt=13064786&cmid=738305 3/67

, 9/6/23, 12:27 PM Assessment 3: Attempt review


Question 3 You would use _____ to reference the variable located in the first
Correct row, first column of the scores two-dimensional array.
Mark 1.00 out of
1.00

a. scores[0][0] 

b. scores[1][1]

c. scores[first][first]

d. scores[1,1]




Your answer is correct.
The correct answer is:
scores[0][0]




https://mymodules.dtls.unisa.ac.za/mod/quiz/review.php?attempt=13064786&cmid=738305 4/67

Document information

Uploaded on
September 6, 2023
Number of pages
67
Written in
2023/2024
Type
Exam (elaborations)
Contains
Questions & answers

Subjects

R133,00
Get access to the full document:

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Get to know the seller

Seller avatar
Reputation scores are based on the amount of documents a seller has sold for a fee and the reviews they have received for those documents. There are three levels: Bronze, Silver and Gold. The better the reputation, the more your can rely on the quality of the sellers work.
hiltontutorials University of South Africa (Unisa)
View profile
Follow You need to be logged in order to follow users or courses
Sold
1905
Member since
7 year
Number of followers
1219
Documents
858
Last sold
9 months ago

3,7

359 reviews

5
145
4
83
3
56
2
28
1
47

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their exams and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can immediately select a different document that better matches what you need.

Pay how you prefer, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card or EFT and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions