In the C++ language when building a class, header files (.h) must be separate from
implementation files (.cpp) correct answers 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! correct answers 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";
} correct answers 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. correct answers False
According to NUMA architecture, all memory in a computer can be accessed and the retrieval
times are constant. correct answers False
What kind of code do computers understand?
Assembly Code
Machine Code
,Source Code
Bro Code correct answers 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> correct answers 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 correct answers 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 correct answers It is compiled
What is the linux command to show the contents of a file?
show
more
There are 2 correct answers listed
cat correct answers 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. correct answers 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 correct answers 920
When a C++ program runs, and dynamic memory is needed, where does the allocated dynamic
memory live in memory?
register
heap
ram
stack correct answers heap
Consider the following C++ code: