1/538
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced |
---|
No study sessions yet.
C is a __________________________________________ programming language (like Ada, BASIC, C++, C#, COBOL, Fortran, Java, Pascal, Perl, Python, Visual Basic).
procedural
When was C developed?
A) late 1950s to early 1960s
B) mid-1960s
C) late 1960s to early 1970s
D) mid 1970s
C
These are the programs that control the entire operation of a computer system (such as I/O, system resources, execution of programs, etc).
operating system
This is the process of analyzing & translating the program from a high-level programming language (such as C) to a form the computer can understand (machine language); creates an executable.
compiling
This is a type of programming language that contains a series of computational steps to be carried out; procedures / routines / functions may be called at any point in the program, including by other functions or itself.
procedural
These are the (low-level) types of instructions that the computer (processor) understands. They are not human readable; they are machine dependent - only worked on the machine that it was developed for (not portable).
machine language
These are the instructions that are defined on a processor. Different processors have different ones of these defined on them (within the circuitry of the processor).
instruction set
These are logical errors, e.g. using a variable that hasn't been declared yet.
semantic
The second sub-step when compiling where the programming language instructions are broken down into assembly language instructions first (.s file) and then converts each assembly language instruction into binary code, or object code (.o file).
assembler
This person from the 1800s is considered to have written the first "computer program". (From the 1800s? How can that be?) There is a computer programming language named after this person.
Ada Lovelace
These are low-level types of instructions that, starting in the early 1950s, allowed the programmer to use a somewhat more English-like way of writing instructions by using abbreviations, or mnemonic codes, to refer to the bit-patterns.
assembly language
This is the basis for many modern operating systems. It was developed at Bell Labs in 1969. One of the driving philosophies of this operating system was that everything consists of small modular units that do one thing well and when combined, can do more powerful things.
Unix
This is the "brains" of the computer that carries out the retrieve, decode, execute, write-back results cycle, which is measured in GHz.
CPU
This is the part of the computer that allows the computer to "think". The items that are currently being processed are held here in this temporary storage, also called main memory. It is measured in GB.
RAM
This refers to the approach or steps taken to solve the problem, to show the logic for the program before you start coding.
algorithm
If the results of compiling your program look like the following:
prog1.c: In function 'main':
prog1.c:14:2: error: expected ';' before 'return'
return 0;
^
The error in your program...
A) must be on line 14
B) could be on line 14 or an earlier line before line 14
C) could be on line 14 or a line after line 14
B
Consider the small program below. It contains several errors that would need to be fixed before it will successfully compile. On which line number is the first error in the program?
2
3 int main() {
4 int a = 2 b = 8, c = -3, result;
5 result = 6 + b a * c;
6 printf("result is: %d\n', result)
7
8 result = a - b + c * 5);
9 printf"result is: %d\n", result);
10
11 return 0:
12 }
4
Your C code that you type up in a file for a program, for example prog2.c, is called what type of code?
source code
Let's say you are currently logged in to
directory and that you have a file in that location called prog.c. You want to change the name of the program from prog.c to prog1.c and only want the one copy of the file (that will be called prog1.c). What Unix/Linux command will allow you to achieve this with just one command?
mv prog.c prog1.c
What is the Unix/Linux command for showing the list of files and directories one directory below where you are currently located?
ls ..
After the following code executes, what would be the value of sum?
int main(void) {
int x = 10, y = 2;
int sum = 0, product = 0, diff = 0, quotient = 0, mod = 0;
sum = x + y;
12
After the following code executes, what would be the value of quotient?
int main(void) {
int x = 10, y = 2;
int sum = 0, product = 0, diff = 0, quotient = 0, mod = 0;
sum = x + y;
quotient = x / y;
5
After the following code executes, what would be the value of diff?
int main(void) {
int x = 10, y = 2;
int sum = 0, product = 0, diff = 0, quotient = 0, mod = 0;
sum = x + y;
quotient = x / y;
diff = x - y;
8
After the following code executes, what would be the value of product?
int main(void) {
int x = 10, y = 2;
int sum = 0, product = 0, diff = 0, quotient = 0, mod = 0;
sum = x + y;
quotient = x / y;
diff = x - y;
product = x * y;
20
After the following code executes, what would be the value of quotient?
int main(void) {
int x = 10, y = 2;