0% found this document useful (0 votes)
102 views9 pages

CS 4402 Graded Quiz Unit 3

The document contains a graded quiz with 20 questions related to computer science concepts, including binary numbers, programming languages, and compilation processes. Each question is accompanied by the correct answer and marks awarded. The quiz demonstrates a strong understanding of topics such as 2's complement, assembler language, and the features of imperative programming languages.

Uploaded by

krisrulzk
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
102 views9 pages

CS 4402 Graded Quiz Unit 3

The document contains a graded quiz with 20 questions related to computer science concepts, including binary numbers, programming languages, and compilation processes. Each question is accompanied by the correct answer and marks awarded. The quiz demonstrates a strong understanding of topics such as 2's complement, assembler language, and the features of imperative programming languages.

Uploaded by

krisrulzk
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 9

Marks 20.00/20.

00
Grade 100.00 out of 100.00

Question 1
Correct
Mark 1.00 out of 1.00

Which option is the 2's complement of the following binary number:


00011100

Select one:
a. 11100100 
b. 01111100
c. 10011100
d. None of these answers

The correct answer is: 11100100

Question 2
Correct
Mark 1.00 out of 1.00

What is the binary equivalent of decimal 25 in 2's complement?

Select one:
a. 00011001 
b. 10011001
c. 11100111
d. None of the above

The correct answer is: 00011001

This study source was downloaded by 100000869292837 from CourseHero.com on 01-28-2025 00:58:38 GMT -06:00

https://www.coursehero.com/file/233563032/CS-4402-Graded-Quiz-Unit-3-Attempt-review-Homepdf/
Question 3
Correct
Mark 1.00 out of 1.00

True/False: The Assembler language was an early step towards abstraction that allowed programmers to use symbols for machine
instructions and not binary numbers?

Select one:
True 
False

The correct answer is 'True'.

Question 4
Correct
Mark 1.00 out of 1.00

The step in the compilation process where EBNF or BNF are used to determine if the structure of programming language statements
are valid is called.

Select one:
a. Syntactical analysis 
b. Lexical analysis
c. Type Checking
d. Semantic Analysis

The correct answer is: Syntactical analysis

Question 5
Correct
Mark 1.00 out of 1.00

True/False: binding refers only to variables. The association of a function name or the output of an expression is not a binding.

Select one:
True
False 

The correct answer is 'False'.

This study source was downloaded by 100000869292837 from CourseHero.com on 01-28-2025 00:58:38 GMT -06:00

https://www.coursehero.com/file/233563032/CS-4402-Graded-Quiz-Unit-3-Attempt-review-Homepdf/
Question 6
Correct
Mark 1.00 out of 1.00

Select the only best answer. The function of the symbolic assembler is to.

Select one:
a. translate the symbols for instructions into binary bit sequences 
b. generate assembly language
c. optimize machine language code
d. provide high level level language abstraction for programmers

The correct answer is: translate the symbols for instructions into binary bit sequences

Question 7
Correct
Mark 1.00 out of 1.00

Using your knowledge of binding, lifetime, and scope rules, determine what the following code will produce as output ... assume that
the code in in the Java language:
public class test {
public static void main(String[] args) {
int x,y;
x=1;
y=my_int(x);
System.out.println(x);
}

static int my_int(x) {


x = 5;
return(x+x);
}
}

Select one:
a. 5
b. 10
c. 1 
d. None of these answers

The correct answer is: 1

This study source was downloaded by 100000869292837 from CourseHero.com on 01-28-2025 00:58:38 GMT -06:00

https://www.coursehero.com/file/233563032/CS-4402-Graded-Quiz-Unit-3-Attempt-review-Homepdf/
Question 8
Correct
Mark 1.00 out of 1.00

True/False: The stored-program computer architecture was a significant innovation by storing the program and data in memory.

Select one:
True 
False

The correct answer is 'True'.

Question 9
Correct
Mark 1.00 out of 1.00

True/False: The following operation in binary will generate the 2's complement binary equivalent of 128?
01111111 + 00000001

Select one:
True
False 

The correct answer is 'False'.

Question 10
Correct
Mark 1.00 out of 1.00

The Fortran programming language was developed by a team led by _______ who later developed a method of describing programming
languages syntax.

Select one:
a. John Backus 
b. Peter Naur
c. Niklaus Wirth
d. Dennis Ritchie

The correct answer is: John Backus

This study source was downloaded by 100000869292837 from CourseHero.com on 01-28-2025 00:58:38 GMT -06:00

https://www.coursehero.com/file/233563032/CS-4402-Graded-Quiz-Unit-3-Attempt-review-Homepdf/
Question 11
Correct
Mark 1.00 out of 1.00

Which of the following is NOT a component of the von Neuman architecture?

Select one:
a. Central Arithmetic or Arithmetic Logic Unit
b. Memory
c. Control Unit
d. Graphics Adapter 

The correct answer is: Graphics Adapter

Question 12
Correct
Mark 1.00 out of 1.00

The most famous descendent of Algo is ____ which was developed in the 1960's by Niklaus Wirth.

Answer: Pascal 

The correct answer is: pascal

Question 13
Correct
Mark 1.00 out of 1.00

True/False: Statically bound variables can be used as arguments in recursive functions.

Select one:
True
False 

The correct answer is 'False'.

This study source was downloaded by 100000869292837 from CourseHero.com on 01-28-2025 00:58:38 GMT -06:00

https://www.coursehero.com/file/233563032/CS-4402-Graded-Quiz-Unit-3-Attempt-review-Homepdf/
Question 14
Correct
Mark 1.00 out of 1.00

A programming language developed in the 1950's for business data processing.

Answer: Cobol 

The correct answer is: cobol

Question 15
Correct
Mark 1.00 out of 1.00

True/False: Type checking is a part of the compilation process that occurs in step 2 syntax analysis.

Select one:
True
False 

The correct answer is 'False'.

This study source was downloaded by 100000869292837 from CourseHero.com on 01-28-2025 00:58:38 GMT -06:00

https://www.coursehero.com/file/233563032/CS-4402-Graded-Quiz-Unit-3-Attempt-review-Homepdf/
Question 16
Correct
Mark 1.00 out of 1.00

Consider the following grammar, which of the following is a terminal symbol?


statement: whileStatement | ifStatement
| ‘{’ statementSequence ‘}’

whileStatement: ‘while’ ‘(‘ expression ‘)’ statement

ifStatement: 'if' '(' expression ')' statement

statementSequence: | statement ‘;’ statementSequence

expression:

Select one:
a. statement
b. whileStatement
c. ifStatement
d. while 

The correct answer is: while

Question 17
Correct
Mark 1.00 out of 1.00

A program that translates or implements a computation specified in an abstract form into the detailed form needed for execution on a
computer is called a:

Answer: Compiler 

The correct answer is: compiler

This study source was downloaded by 100000869292837 from CourseHero.com on 01-28-2025 00:58:38 GMT -06:00

https://www.coursehero.com/file/233563032/CS-4402-Graded-Quiz-Unit-3-Attempt-review-Homepdf/
Question 18
Correct
Mark 1.00 out of 1.00

Which of the following is NOT a feature or characteristic of imperative programming languages.

Select one:
a. Not Referentially Transparent
b. Programming specifies the result not the steps 
c. Based upon assignment
d. Is dependent on state

The correct answer is: Programming specifies the result not the steps

Question 19
Correct
Mark 1.00 out of 1.00

True/False: The Scope of a variable refers to the domain where a specific binding refers to the same location in memory.

Select one:
True 
False

The correct answer is 'True'.

This study source was downloaded by 100000869292837 from CourseHero.com on 01-28-2025 00:58:38 GMT -06:00

https://www.coursehero.com/file/233563032/CS-4402-Graded-Quiz-Unit-3-Attempt-review-Homepdf/
Question 20
Correct
Mark 1.00 out of 1.00

In the following example EBNF grammar, what does the symbol <expr> describe?

<expr> := '-'? <digit>+ ('.' <digit>+)?

<digit> := '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9'

Select one:
a. An Integer
b. A real number 
c. A character
d. A string

The correct answer is: A real number

This study source was downloaded by 100000869292837 from CourseHero.com on 01-28-2025 00:58:38 GMT -06:00

https://www.coursehero.com/file/233563032/CS-4402-Graded-Quiz-Unit-3-Attempt-review-Homepdf/
Powered by TCPDF (www.tcpdf.org)

You might also like