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

Advanced Programming in C++ Cisco Chapter 8 Assessment

Beoordeling
-
Verkocht
-
Pagina's
28
Cijfer
A+
Geüpload op
02-09-2022
Geschreven in
2021/2022

Advanced Programming in C++ Cisco Chapter 8 Assessment Answers

Instelling
Vak

Voorbeeld van de inhoud

Attempt History
Attempt Time Score

LATEST Attempt 1 38 minutes 23 out of 26
Answers will be shown after your last attempt
Score for this attempt: 23 out of 26
Submitted Dec 26 at 11:19pm
This attempt took 38 minutes.

Question 1
pts
What will happen when you attempt to compile and run the following code?

#include <iostream>
using namespace std;
int main()
{
cout<<127<<", ";
cout.setf(ios::hex);//LINE I
cout<<127<<", ";
cout.setf (ios::showbase ); //LINE II
cout<<127<<", ";
return 0;
}




program outputs: 127, 7f, 0x7f



program outputs: 127, 7f, 7f



compilation error in LINE I



runtime error at LINE II



program outputs: 127, 0x7f, 0x7f

,compilation error in LINE II



program outputs: 127, 127, 127, (but it is an unpredictable result)



Question 2
pts
What will happen when you attempt to compile and run the following code?

#include <iostream>
using namespace std;
int main()
{
cout<<127<<", ";
cout.setf(ios::hex);//LINE I
cout<<127<<", ";
cout.setf (ios::showbase, ios::basefield ); //LINE II
cout<<127<<", ";
return 0;
}




program outputs: 127, 0x7f, 0x7f



compilation error in LINE II



compilation error in LINE I



runtime error at LINE II



program outputs: 127, 7f, 7f

, program outputs: 127, 7f, 0x7f



program outputs: 127, 127, 127, (but it is an unpredictable result)



Question 3
pts
What will happen when you attempt to compile and run the following code?

#include <iostream>
using namespace std;
int main()
{
cout<<127<<", ";
cout.setf(ios::hex, ios::basefield);//LINE I
cout<<127<<", ";
cout.setf (ios::showbase); //LINE II
cout<<127<<", ";
return 0;
}




program outputs: 127, 7f, 7f



compilation error in LINE I



program outputs: 127, 7f, 0x7f



compilation error in LINE II



program outputs: 127, 0x7f, 0x7f



program outputs: 127, 127, 127,

Geschreven voor

Vak

Documentinformatie

Geüpload op
2 september 2022
Aantal pagina's
28
Geschreven in
2021/2022
Type
Tentamen (uitwerkingen)
Bevat
Vragen en antwoorden

Onderwerpen

€4,90
Krijg toegang tot het volledige document:

100% tevredenheidsgarantie
Direct beschikbaar na je betaling
Lees online óf als PDF
Geen vaste maandelijkse kosten

Maak kennis met de verkoper
Seller avatar
arviemontemayor

Ook beschikbaar in voordeelbundel

Maak kennis met de verkoper

Seller avatar
arviemontemayor AMACC
Volgen Je moet ingelogd zijn om studenten of vakken te kunnen volgen
Verkocht
-
Lid sinds
3 jaar
Aantal volgers
0
Documenten
39
Laatst verkocht
-

0,0

0 beoordelingen

5
0
4
0
3
0
2
0
1
0

Populaire documenten

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 Bancontact, iDeal of creditcard en download je PDF-document meteen.

Student with book image

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

Alisha Student

Veelgestelde vragen