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 mcq solutions

Rating
-
Sold
-
Pages
38
Grade
A+
Uploaded on
15-09-2023
Written in
2023/2024

Using this document will get you a 100% pass mark to the 60 mcq questions to the COS1511 assignment 3 2023

Institution
Course

Content preview

9/15/23, 8:56 PM Assessment 3: Attempt review




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

QUIZ




Started on Friday, 15 September 2023, 8:36 PM
State Finished
Completed on Friday, 15 September 2023, 8:55 PM
Time taken 19 mins 3 secs
Marks 59.00/60.00
Grade 98.33 out of 100.00


Question 1
Correct

Mark 1.00 out of 1.00




Given the declaration below, which statement assigns the element in the first
row and first column a value of 99?

int scores[3][2] = {0};



a. scores[1][1] = 99;

b. scores[0][0] = '99';

c. scores[0][0] = 99; 

d. scores[1][1] = "99";




Your answer is correct.

The correct answer is:
scores[0][0] = 99;




https://mymodules.dtls.unisa.ac.za/mod/quiz/review.php?attempt=13404461&cmid=738305#question-13588782-19 1/38

,9/15/23, 8:56 PM Assessment 3: Attempt review

Question 2
Correct

Mark 1.00 out of 1.00




Given the array declaration below, what is stored in numbers[2] ?
int numbers[5] = {1, 2, 3, 4, 5};




a. 0

b. 1

c. 2

d. 3 




Your answer is correct.
The correct answer is:
3




Question 3
Correct

Mark 1.00 out of 1.00




Which of the following statements declares a one-dimensional array containing
two integer values?


a. int numbers[3] = {1, 2, 3};

b. char letters[2] = {'a', 'b'};

c. int characters[2] = {45, 87}; 

d. int ages[6] = {0};




Your answer is correct.

The correct answer is:
int characters[2] = {45, 87};




https://mymodules.dtls.unisa.ac.za/mod/quiz/review.php?attempt=13404461&cmid=738305#question-13588782-19 2/38

,9/15/23, 8:56 PM Assessment 3: Attempt review

Question 4
Correct

Mark 1.00 out of 1.00




Consider the following struct definition:
struct temp {

int b; };
temp s[50];
The correct syntax to access the member of the ith structure in the array of
structures is?



a. s.b.[i];

b. s.[i].b;

c. s.b[i];

d. s[i].b; 




Your answer is correct.
The correct answer is:
s[i].b;




Question 5
Correct

Mark 1.00 out of 1.00




What is the output of the following program?
#include <iostream>
using namespace std;
void X(int A, int &B)
{
A = A + B;
B = A - B;
A = A - B;
}
int main()
{
int a = 4, b = 18;
X(a,b);
cout << a << ", " << b;
return 0;
}



a. 4, 4 

b. 18, 4

c. 18, 18

d. 4, 18




Your answer is correct.
The correct answer is:
4, 4




https://mymodules.dtls.unisa.ac.za/mod/quiz/review.php?attempt=13404461&cmid=738305#question-13588782-19 3/38

, 9/15/23, 8:56 PM Assessment 3: Attempt review

Question 6
Correct

Mark 1.00 out of 1.00




Variables located in the first column in a two-dimensional array are assigned a
column subscript of _____.



1. 0
2. 1
3. -1
4. NULL


a. 0 

b. 1

c. -1

d. NULL




Your answer is correct.

The correct answer is:
0




https://mymodules.dtls.unisa.ac.za/mod/quiz/review.php?attempt=13404461&cmid=738305#question-13588782-19 4/38

Written for

Institution
Course

Document information

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

Subjects

$9.47
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.
ThinkLab University of South Africa (Unisa)
Follow You need to be logged in order to follow users or courses
Sold
171
Member since
3 year
Number of followers
118
Documents
107
Last sold
8 months ago
ThinkLab Tutorials

A group of tutors that upload notes, exam elaborations, exam packs, assignment solutions and free packs. Unlock the door to academic excellence with our top-notch document uploads! It's meticulously prepared with foolproof solutions that guarantee your success. Trust in our reliable resources and conquer any challenge that comes your way. Don't settle for anything less than perfection in your studies. Our reliable document boasts 100% correct solutions, meticulously reviewed for your success. Say goodbye to uncertainty and hello to unwavering confidence! Giving the best services as the modules we are uploading are considered. If you have any questions, you're welcome to message us directly.

Read more Read less
4.0

20 reviews

5
8
4
5
3
6
2
1
1
0

Why students choose Stuvia

Created by fellow students, verified by reviews

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

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card 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