100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached
logo-home
COS1511 ASSIGNMENT 3 SOLUTIONS 2023 R133,00   Add to cart

Exam (elaborations)

COS1511 ASSIGNMENT 3 SOLUTIONS 2023

 10 views  1 purchase

COS1511 ASSIGNMENT 3 SOLUTIONS 2023

Preview 4 out of 67  pages

  • September 6, 2023
  • 67
  • 2023/2024
  • Exam (elaborations)
  • Questions & answers
All documents for this subject (31)
avatar-seller
hiltontutorials
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

The benefits of buying summaries with Stuvia:

Guaranteed quality through customer reviews

Guaranteed quality through customer reviews

Stuvia customers have reviewed more than 700,000 summaries. This how you know that you are buying the best documents.

Quick and easy check-out

Quick and easy check-out

You can quickly pay through EFT, credit card or Stuvia-credit for the summaries. There is no membership needed.

Focus on what matters

Focus on what matters

Your fellow students write the study notes themselves, which is why the documents are always reliable and up-to-date. This ensures you quickly get to the core!

Frequently asked questions

What do I get when I buy this document?

You get a PDF, available immediately after your purchase. The purchased document is accessible anytime, anywhere and indefinitely through your profile.

Satisfaction guarantee: how does it work?

Our satisfaction guarantee ensures that you always find a study document that suits you well. You fill out a form, and our customer service team takes care of the rest.

Who am I buying this summary from?

Stuvia is a marketplace, so you are not buying this document from us, but from seller hiltontutorials. Stuvia facilitates payment to the seller.

Will I be stuck with a subscription?

No, you only buy this summary for R133,00. You're not tied to anything after your purchase.

Can Stuvia be trusted?

4.6 stars on Google & Trustpilot (+1000 reviews)

64438 documents were sold in the last 30 days

Founded in 2010, the go-to place to buy summaries for 14 years now

Start selling
R133,00  1x  sold
  • (0)
  Buy now