CS3100 Midterm Exam Study Set

Ace your homework & exams now with Quizwiz!

A computer's ____ is volatil; that is, any information stored in it is lost when the system's power is turned off. A. Memory B. Hard Disk C. Flash Disk D. CD-ROM

A

An algorithm is a set of steps need to solve a problem. These steps could be written in English or in a Programming Language. A. True B. False

A

For Java or C, Which one of the following statements is correct? A. Every statement in a program must end with a semicolon. B. Every comment line must end with a semicolon. C. Every line in a program must end with a semicolon.

A

Variable name resolution (number of significant characters for the uniqueness of variable) depends on _____ A. Compiler and linker implementations B. Assemblers and loaders implementations C. C language D. None of the mentioned

A

What is the exact output of the following code? double area = 3.5; System.out.println(area); A. 3.5 B. area is 3 C. area is 35 D. 3.0

A

What is the name of the Java file that this program would be sxaved as? public class CalculateMe { } A. CalculateMe.java B. CalculateMe.py C. CalculateM.java D. Calculateme.java

A

Which of the following contains specific rules and words that express the logical steps of an algorithm? A. Programming Language B. Syntax C. Programming Structure D. Logical Chart

A

Which of the following is true about formatting your code with comments, white space, and consistent indenting. A. Makes program more readable and reduces programming errors. B. Makes the program run faster C. Taking time to format code is a waste of time. D. Good formatting is required for a program to compile

A

A block in Java and C is enclosed by A. Smoorth parenthesis () B. Curly Braces {} C. Quotes "" D. Square Braces []

B

Computer program are written in a high level programming language, however the human readable version of a program is called A. Word Size B. Source Code C. Instruction Set D. Application

B

Single-line comments begin with: A. { B. // C. "" D. (

B

Which of the following is an object oriented programming language? A. C B. C++ C. ML D. ADA

B

___ is the physical aspect of the computer that can be seen A. Application Program B. Hardware C. Operating System D. Software

B

_____ translates high-level langauge program into machine language program. A. Assembler B. Compiler C. CPU D. The operating system

B

______ are words that a programming language has set aside for its own use. A. Control Words B. Reserved Words C. Reserved Keys D. None of these

B

Which among the following is/are interpreted language? A. C B. C++ C. Java D. Visual Basic

Both C and D

A computer program use for business application is ____ A. LOGO B. FORTRAN C. COBOL D. BASIC

C

If a program compiles fine, but it produces incorrect result, then the program suffers ____ A. A runtime error B. A compilation error C. A logic error

C

In the following code snippet, area is ______ double area = 3.5; System.out.println(area); A. is a value that contains a decimal point B. a named entity that is assigned a value which our program then uses C. All of the above D. Variable

C

What will happen if the below program is executed? #include <stdio.h> int main() { int main = 3; printf("%d", main); return 0; } A. It will cause a compile-time error B. It will cause a run-time error C. It will run without any error and prints 3 D. It will experience infinite looping

C

Why do computers use zeros and ones? A. Because binary numbers are the bases upon which all other number systems are built. B. Because binary numbers are simplest C. Because digital devices have two stable states and it is natural to use one state for 0 and the other for 1. D. Because combinations of zeros and ones can represent any numbers and characters

C

Why do variable names beginning with the underscore is not encouraged? A. It is not standardized B. To avoid conflicts since assemblers and loaders use such names C. To avoid conflicts since library routines use such names D. To avoid conflicts with environment variables of an operating system

C

_____ is the brain of the computer. A. Disk B. Hardware C. CPU D. Memory

C

_______ Are instructions to the computer A. Hardware B. Keyboards C. Programs

C

public class Test { public static void main(String[] args) { System.out.println("Welcome to Java!") } } A. This code has a logic error. B. This code has a run-time error. C. This code has a syntax error.

C

A program and its data must be moved into the computer's _____ before they can be executed by the CPU. A. Hard Disk B. CD-ROM C. CPU D. Memory

D

Computer can execute the code in _____ A. High-Level Language B. Assembly Language C. None of the Above D. Machine Language

D

Languages which can easily interact with the hardware are called ______ A. High level languages B. Middle level languages C. All of the above D. Low level languages

D

TextPad allows a programmer to A. Edit a Java Program B. Compile a Java Program C. Run a Java Program D. All of the Above

D

The following line of code has what type of error? System.out.println("Hello, World!") A. Hello World should be enclosed in single quotes. B. This code is just fine, nothing is wrong. C. The end of the line of code needs a period. D. A missing semi-colon at the end of the line of code.

D

Which of the following is not a valid variable name declaration? A. int ____a3; B. int ___3a; C. int ____A3; D. None of the mentioned

D

__________ Are words that a programming language has set aside for its own use. A. Control words B. Reserved keys C. Control Structures D. Reserved words

D

State three language design trade-offs

Efficiency vs. Safety, Readability vs. Writability, and Reliability vs. Cost of Execution.

What are Programming Languages called that are based on the Von Neumann architecture?

Imperative Programming Languages

These are the four criteria for evaluating programming languages

Readability, Writability, Reliability, and Cost.

How would you display "Welcome to Java" on the console?

System.out.println("Welcome to Java");

Too much orthogonality can cause problems? True or False.

True

Too much simplicity can be a problem. True or False.

True

The Java main method header is written as:

public static void main(String[] args)


Related study sets

Study Guide: Appendicular Skeleton Session Questions

View Set

L'Oreal Superday - Technical Questions

View Set

Technical Interview Questions - Networking

View Set

FCE Use of English Part 4 (TESTS 4-6) Paraphrasing

View Set

Chapter 28: Obstructive Pulmonary Diseases (Lewis)

View Set