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)

CPA Programming Essentials in C++ Cisco Chapter 2 QUIZ

Rating
-
Sold
-
Pages
9
Grade
A+
Uploaded on
02-09-2022
Written in
2021/2022

CPA Programming Essentials in C++ Cisco Chapter 2 QUIZ

Institution
Course

Content preview

Question 1
pts
What is the output of the following program?


#include <iostream>
using namespace std;
int main(void) {
int i = 2;
float a = 3;
bool f1 = i > a, f2 = a > i, f3 = a / i > i / a;
if(f3)
if(f2)
i+=1;
else
i+=2;
else
if(f1)
i+=3;
else
i+=4;
cout << i << endl;
return 0;
}




1



0



2



3



Question 2

, pts
What is the output of the following program?


#include <iostream>
using namespace std;
int main(void) {
int i = 10;
float a = 1000.0;
while(i > 0) {
i /= 2;
a /= 10;
}
cout << a << endl;
return 0;
}




10



1



0.01



0.1



Question 3
pts
What is the output of the following program?


#include <iostream>
using namespace std;
int main(void) {
int i = 10;

Written for

Course

Document information

Uploaded on
September 2, 2022
Number of pages
9
Written in
2021/2022
Type
Exam (elaborations)
Contains
Questions & answers

Subjects

$5.49
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
arviemontemayor

Document also available in package deal

Get to know the seller

Seller avatar
arviemontemayor AMACC
Follow You need to be logged in order to follow users or courses
Sold
-
Member since
3 year
Number of followers
0
Documents
39
Last sold
-

0.0

0 reviews

5
0
4
0
3
0
2
0
1
0

Trending documents

Recently viewed by you

Why students choose Stuvia

Created by fellow students, verified by reviews

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

Didn't get what you expected? Choose another document

No worries! You can immediately select a different document that better matches what you need.

Pay how you prefer, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card or EFT and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Frequently asked questions