Quizzes
Search
Take Quizzes
Animal
Nutrition
Love
Relationship
Computer
Sports
Society
Business
Geography
Language
Personality
Harry Potter
Movie
Television
Music
Online Exam
Health
Country
Art
Entertainment
Celebrity
Math
Game
Book
Fun
Science
Food
History
Education
All Topics
Create a Quiz
Quiz Maker
Training Maker
Survey Maker
Flashcards
Brain Games
See All
ProProfs.com
Search
Create A Quiz
Take Quizzes
Animal
Nutrition
Love
Relationship
Computer
Sports
Society
Business
Geography
Language
Personality
Harry Potter
Movie
Television
Music
Online Exam
Health
Country
Art
Entertainment
Celebrity
Math
Game
Book
Fun
Science
Food
History
Education
All Topics
Products
Quiz Maker
Training Maker
Survey Maker
Flashcards
Brain Games
See All
ProProfs.com
Quizzes
Quizzes
›
Computer
C+ Programming Toughest Exam! Quiz
30 Questions
|
By Archembaud | Updated: Mar 17, 2022
| Attempts: 127
Share
Start
Share on Facebook
Share on Twitter
Share on Whatsapp
Share on Pinterest
Share on Email
Copy to Clipboard
Embed on your website
Question
1
/ 30
0 %
0/100
Score
0/100
1.
What will this code produce when compiled and run?
There is an error in this code, and it will not run.
Sum = 0
Sum = 7
There is not enough information to answer this question.
Submit
Start Quiz
About This Quiz
.
2.
What first name or nickname would you like us to use?
You may optionally provide this to label your report, leaderboard, or certificate.
2.
Examine this C/C++ code. What is a suitable variable declaration for the variable "a"?
Int a;
Float a;
Double a;
None of these options are correct.
Submit
3.
Examine this code. Which option below do you think best describes this code?
There is an error in this code.
The integer a is declared and defined as 5.
The decimal variable a is declared and defined.
The variable a is declared, but not defined.
Submit
4.
What will this code produce when compiled and run?
Result = 5, 7
Result = 5, 2
There is an error in this code, and it will not run.
None of these options are correct.
Submit
5.
What will this code produce when run?
Not Equal
Equal
This code won't run - there is an error.
None of these options are correct.
Submit
6.
Examine this Colobot code. What will this robot do when an enemy approaches?
It will change direction to run away (backwards) from the enemy when it is close enough.
This robot will do nothing - it will sit still until it dies.
The robot will not change its direction, but will try to run away from the enemy.
The robot will try to run into the enemy robot.
Submit
7.
What will this code produce when it is run?
There is an error in this code, and it will not run.
Result = 1 and 3
Result = 2 and 4
None of these answers.
Submit
8.
Consider the Bisection method code as shown. What will the final value of e be when the code is run?
E = 3.59375
E = 3.741657
E = 3.4375
This code will not run - there is a mistake in the code.
Submit
9.
Consider the radar data and colobot code shown here. The position of your robot is shown by the red dot, while other item positions are shown by blue dots.After this code is run, what might the array "a" contain?
A = [7.07, 11.18, 25, 31.622, 0]
A = [5, 10, 25, 30, 0]
A = [31.622, 0, 0, 0, 0]
None of these options are correct.
Submit
10.
Consider this MATLAB code. What do you think this code does?
Uses the Bisection method to solve the equation erf(x) = x - 2
Uses the Newton Raphson method to solve the equation erf(x) = x - 2
This code will not run, as there is an error in it.
This code does not use either the Bisection Method or Newton-Raphson method.
Submit
11.
Consider this code as shown. When it is run, what will it show?
This code will not run - there is an error.
C = 5
C = 2
C = 3
Submit
12.
Consider this code - what will the value of c be?
This code is not correct, and will not run.
C = 5
C = false
C = 0
Submit
13.
If (dy/dt) = 5y and y = 2 when t = 0, compute y at t = 0.6 using the Euler method. Use a timestep dt of 0.2. (i.e. dt = 0.2).
Y(0.6) ~ 16
Y(0.6) ~ 10
Y(0.6) ~ 40
None of these options are correct.
Submit
14.
What will this code produce when run?
A = 5
A = 0000743DEF2
This code will not work - there is an error.
None of these - the code will produce something else.
Submit
15.
Consider the code shown - when it is run, what will it show?
A = 0000023FD74, b = 5
A = 5, b = 5
The code will not run - there is an error.
A = 0, b = 5.
Submit
16.
What will this code produce when run?
A = 5
A = 00007542DCE1
This code won't run - there is an error.
None of these options are correct. The code will produce something else.
Submit
17.
What will this code produce when run?
A = 5
A = 00000742DEF0
This code won't run - there is an error.
None of these options - this code will produce something else.
Submit
18.
Examine this code - what will it produce when it is run?
Equal
Not equal
This code won't run - there is an error!
None of these options are correct.
Submit
19.
Read this code - what can you say about the variables a and b?
The floating point variable a cannot be defined as an integer 5.
The variables a and b are both declared and defined.
The variables a and b are only declared.
This is a mistake in this code - it will not work!
Submit
20.
Consider the following code. What will it produce when it is run?
The code is not correct, and will not run.
C = 1
C = 0
None of these answers are correct.
Submit
21.
Consider this Colobot code designed to shoot at an enemy. What problem does this method have?
The code is fine - this robot will hit its target if the enemy is less than 5 units away.
The code won't work - there is an error in the code (i.e. it won't compile or run)
The robot won't hit a moving target, even if it is range, because the target data is old.
The robot doesn't change the angle of the gun - if the target is too low or too high, it...
The robot doesn't change the angle of the gun - if the target is too low or too high, it won't hit it.
Submit
22.
Examine this code. Is there an error in this code, and if so, which line is it on?
Line 4 (The line with the for loop)
Line 1 (The line with the #include)
Line 7 (The line with the printf)
There are no errors in this code.
Submit
23.
What will this code produce when run?
B = 5
B = 4
None of these options are correct.
B = 2
Submit
24.
Using the Trapezoid Rule, find the integral of x*sin(x) from x = 0 to 1 using 5 parts. What is the approximate answer using the Trapezoid Rule?
None of these answers are correct.
0.301
0.389
0.221
Submit
25.
What will this code produce when run?
This code won't run - there is an error.
Result = 1 and 3
Result = 2 and 4
This code will run - but the array b is not defined. It will produce rubbish.
Submit
26.
Examine this code. Which of the following choices is correct?
There is a mistake in this code.
Both variables a and b are declared as integers.
Both variables a and b are declared and defined.
The integer b is defined and declared, while the integer a is only defined.
Submit
27.
Read this code and choose the correct option below. When this code is run, what will be shown?
This code will not run - there is an error in the code.
A = %d\n
A = 5
A = 5\n
Submit
28.
Consider this code and choose the best option below.
This code is incorrect and will not work.
This code MAY be incorrect - there is not enough information.
The variables c and d are declared.
The variables c and d are declared and defined.
Submit
29.
Consider the attached Euler method code used to solve an ODE.After looking at this code - what do you think the ODE being solved is?
This code won't work - the output variable u is not defined, so the code won't run.
(See this equation)
(See this equation)
None of these options are correct.
Submit
30.
Consider the Bisection method code shown. What will the final value of e be when the computation is completed?
There is a mistake in this code, and it will not run.
E = 3.7416
E = 4.8537
E = 3.59375
Submit
×
Thank you for your feedback!
View My Results
Related Quizzes
Tablet Quiz: What Tablet Should I Buy Quiz
Tablet Quiz: What Tablet Should I Buy Quiz
Thank you for your feedback!
Would you like to edit this question to improve it?
No thanks
Name:
Email:
Oops! Give us more information:
Incorrect Question
Incorrect Answer
Typos
I have a feedback
Submit
Please provide name and email to proceed.
Please provide correct email to proceed.
Please provide feedback.
Please select the option.
All (30)
Unanswered (
)
Answered (
)
What will this code produce when compiled and run?
Examine this C/C++ code. What is a suitable variable declaration for...
Examine this code. Which option below do you think best describes this...
What will this code produce when compiled and run?
What will this code produce when run?
Examine this Colobot code. What will this robot do when an enemy...
What will this code produce when it is run?
Consider the Bisection method code as shown. What will the final value...
Consider the radar data and colobot code shown here. The position of...
Consider this MATLAB code. What do you think this code does?
Consider this code as shown. When it is run, what will it show?
Consider this code - what will the value of c be?
If (dy/dt) = 5y and y = 2 when t = 0, compute y at t = 0.6 using the...
What will this code produce when run?
Consider the code shown - when it is run, what will it show?
What will this code produce when run?
What will this code produce when run?
Examine this code - what will it produce when it is run?
Read this code - what can you say about the variables a and b?
Consider the following code. What will it produce when it is run?
Consider this Colobot code designed to shoot at an enemy. What problem...
Examine this code. Is there an error in this code, and if so, which...
What will this code produce when run?
Using the Trapezoid Rule, find the integral of x*sin(x) from x = 0 to...
What will this code produce when run?
Examine this code. Which of the following choices is correct?
Read this code and choose the correct option below....
Consider this code and choose the best option below.
Consider the attached Euler method code used to solve an ODE.After...
Consider the Bisection method code shown. What will the final value of...
X
OK
X
OK
Cancel
X
OK
Cancel
Advertisement