100% tevredenheidsgarantie Direct beschikbaar na je betaling Lees online óf als PDF Geen vaste maandelijkse kosten 4.2 TrustPilot
logo-home
Tentamen (uitwerkingen)

Problem set 11 - ubc 2023 - cpsc 110

Beoordeling
-
Verkocht
-
Pagina's
7
Cijfer
A+
Geüpload op
06-12-2025
Geschreven in
2025/2026

Problem set 11 - ubc 2023 - cpsc 110

Instelling
Problem Set 11 - Ubc 2023 - Cpsc 110
Vak
Problem set 11 - ubc 2023 - cpsc 110









Oeps! We kunnen je document nu niet laden. Probeer het nog eens of neem contact op met support.

Geschreven voor

Instelling
Problem set 11 - ubc 2023 - cpsc 110
Vak
Problem set 11 - ubc 2023 - cpsc 110

Documentinformatie

Geüpload op
6 december 2025
Aantal pagina's
7
Geschreven in
2025/2026
Type
Tentamen (uitwerkingen)
Bevat
Vragen en antwoorden

Onderwerpen

Voorbeeld van de inhoud

UBC 2024-CPSC 121 Review
Study online at https://quizlet.com/_gabqt9
1. Which among the following statements will produce this output on screen?
Select all that apply.

Tell me who your friends are,
and I'll tell you mine!

a) cout << "Tell me who your friends are," << endl << "and I'll tell you mine!";
b) cout << "Tell me who your friends are";
cout << "and I'll tell you mine!";
c) cout << "Tell me who your friends";
cout << "are,\nand I'll tell you mine!";
d) cout << "Tell me who your friends are," << endl;
cout << "and I'll tell you mine!";: a, c, d
2. Why does the code below fail to compile?

#include <iostream>
using namespace std;
int main ()
{
cout << "\"I'm here", John said" << endl;
return 0;
}

The code's expected output is shown below:
"I'm here", John said

Select one:
a) The " after the word here in the code incorrectly terminates the string.
b) There are no errors in the code and it produces the expected output.
c) The \" before the word I'm in the code in unnecessary.
d) The " after the word said in the code needs to be escaped (replace with \")
to properly terminate the string.: a
3. Identify the type of literal below.

"algorithm": string literal
4. Identify the type of literal below.

'Z': character literal

1/7

, UBC 2024-CPSC 121 Review
Study online at https://quizlet.com/_gabqt9
5. Identify the type of literal below.

"121": string literal
6. Identify the type of literal below.

121: integer literal
7. Identify the type of literal below.

2018.09: floating-point literal
8. Identify the type of literal below.

5: integer literal
9. Why is the identifier below identify a C++ variable name? Select all that
apply.

4th_Section#2

Select one or more:
a) It starts with a number.
b) It contains uppercase characters.
c) It contains a # symbol.
d) It contains a _ symbol.: a, c
10. What will be the result of the following relational operation? Assume that
age is 20.

age >= 18

Select one:
a) true
b) false: a
11. Identify whether the following statements perform promotion or demotion.

cout << 4.0/3 << endl;: promotion
12. Identify whether the following statements perform promotion or demotion.

double cash = 1000;: promotion
13. Identify whether the following statements perform promotion or demotion.

int age = 15.6;: demotion
2/7

Maak kennis met de verkoper

Seller avatar
De reputatie van een verkoper is gebaseerd op het aantal documenten dat iemand tegen betaling verkocht heeft en de beoordelingen die voor die items ontvangen zijn. Er zijn drie niveau’s te onderscheiden: brons, zilver en goud. Hoe beter de reputatie, hoe meer de kwaliteit van zijn of haar werk te vertrouwen is.
eduustudent stuvia
Volgen Je moet ingelogd zijn om studenten of vakken te kunnen volgen
Verkocht
10
Lid sinds
9 maanden
Aantal volgers
0
Documenten
1572
Laatst verkocht
1 week geleden

3,7

3 beoordelingen

5
2
4
0
3
0
2
0
1
1

Recent door jou bekeken

Waarom studenten kiezen voor Stuvia

Gemaakt door medestudenten, geverifieerd door reviews

Kwaliteit die je kunt vertrouwen: geschreven door studenten die slaagden en beoordeeld door anderen die dit document gebruikten.

Niet tevreden? Kies een ander document

Geen zorgen! Je kunt voor hetzelfde geld direct een ander document kiezen dat beter past bij wat je zoekt.

Betaal zoals je wilt, start meteen met leren

Geen abonnement, geen verplichtingen. Betaal zoals je gewend bent via iDeal of creditcard en download je PDF-document meteen.

Student with book image

“Gekocht, gedownload en geslaagd. Zo makkelijk kan het dus zijn.”

Alisha Student

Veelgestelde vragen