• ¿Documento equivocado? Cámbialo gratis
  • Escrito por estudiantes que aprobaron
  • Inmediatamente disponible después del pago
  • Leer en línea o como PDF
Vender
¿Dónde estudias?
Tu idioma
Document preview thumbnail
Vista previa 4 fuera de 38 páginas
Examen

COS1511 assignment 3 mcq solutions

Document preview thumbnail
Vista previa 4 fuera de 38 páginas

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

Vista previa del contenido

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

Información del documento

Subido en
15 de septiembre de 2023
Número de páginas
38
Escrito en
2023/2024
Tipo
Examen
Contiene
Preguntas y respuestas
$9.38

¿Documento equivocado? Cámbialo gratis Dentro de los 14 días posteriores a la compra y antes de descargarlo, puedes elegir otro documento. Puedes gastar el importe de nuevo.
Escrito por estudiantes que aprobaron
Inmediatamente disponible después del pago
Leer en línea o como PDF

Seller avatar
Los indicadores de reputación están sujetos a la cantidad de artículos vendidos por una tarifa y las reseñas que ha recibido por esos documentos. Hay tres niveles: Bronce, Plata y Oro. Cuanto mayor reputación, más podrás confiar en la calidad del trabajo del vendedor.
ThinkLab
4.0
(21)
Vendido
171
Seguidores
118
Artículos
107
Última venta
11 meses hace



Por qué los estudiantes eligen Stuvia

Creado por compañeros estudiantes, verificado por reseñas

Calidad en la que puedes confiar: escrito por estudiantes que aprobaron y evaluado por otros que han usado estos resúmenes.

¿No estás satisfecho? Elige otro documento

¡No te preocupes! Puedes elegir directamente otro documento que se ajuste mejor a lo que buscas.

Paga como quieras, empieza a estudiar al instante

Sin suscripción, sin compromisos. Paga como estés acostumbrado con tarjeta de crédito y descarga tu documento PDF inmediatamente.

Student with book image

“Comprado, descargado y aprobado. Así de fácil puede ser.”

Alisha Student

Preguntas frecuentes