Answers || 100% Verified Answers || A+ Graded ||
Guaranteed Pass
In the C++ language when building a class, header files (.h) must be separate from
implementation files (.cpp) - ANSWER False
What does Amdahl's law describe?
The computing power will double every 18 months
Programs can run faster if you use parallel processing
Moore was an optimist
The sequential work will limit the speedup due to parallelism! - ANSWER The sequential work
will limit the speedup due to parallelism!
This program will compile and run just fine:
#include <iostream>
int main()
{
cout << "Hello World\n";
} - ANSWER False
When building a class in C++, it is good practice to make the data members public so that other
classes can quickly access them. This is what makes C++ a fast language. - ANSWER False
According to NUMA architecture, all memory in a computer can be accessed and the retrieval
times are constant. - ANSWER False
,What kind of code do computers understand?
Assembly Code
Machine Code
Source Code
Bro Code - ANSWER Machine Code
How do you create an array of 20 integers called nums in C++?
integer nums[20];
int nums = new int[20];
int nums[20];
nums[20] <int> - ANSWER int nums[20];
What linux command is used to print "Hello World" on the terminal
echo Hello World
print Hello World
type Hello World
push Hello World - ANSWER echo Hello World
What statement is true about he C++ language?
it is interpreted
It is compiled
None of these answers are correct.
It was invented in 1968 - ANSWER It is compiled
What is the linux command to show the contents of a file?
show
,more
There are 2 correct answers listed
cat - ANSWER There are 2 correct answers listed
Consider this code segment:
int nums[10];
nums[10] = 999;
Which of the following statements is true?
The code will compile but there is something wrong with this code
There is nothing wrong with the code
C++ is a dangerous motorcycle and you could be mortally wounded if you try to use it!!!
The code will not compile. - ANSWER The code will compile but there is something wrong with
this code
Suppose I have a file numbers.dat with the number 1 through 1000 sorted, one number per
line. What will be printed on the screen if I type this command sequence:
% more numbers.dat | tail -100 | head -20 | tail -1
920
none of these answers is correct
921
901 - ANSWER 920
When a C++ program runs, and dynamic memory is needed, where does the allocated dynamic
memory live in memory?
register
, heap
ram
stack - ANSWER heap
Consider the following C++ code:
int a = 10;
int *ptr = &a;
cout << ptr;
What is printed out?
the memory address of a
the number 10
the contents of a
the memory address of ptr - ANSWER the memory address of a
The fibonacci function is a recursive function. Each time the function gets called in a recursive
loop, what type of memory is used to store the contents and state of the program?
register
heap
ram
stack - ANSWER stack
Consider this code segment:
int x = 10;
int y = 20;
int z = mystery(x, y);