Computer Programming and Design

Lakukan tugas rumah & ujian kamu dengan baik sekarang menggunakan Quizwiz!

C. reads the whole program even if it encounters errors

If an error occurs, what compiler do? A. terminate program B. stops execution C. reads the whole program even if it encounters errors D. give warning

B. stops execution

If an error occurs, what interpreter do? A. terminate program B. stops execution C. reads the whole program even if it encounters errors D. give warning

B. Boxes

Actual instructions in flowcharting are represented in __________ A. Circles B. Boxes C. Arrows D. Lines

D. an index number

An array element is accessed using A. a first-in-first-out approach B. the dot operator C. a member name D. an index number

B. arithmetic, relational, assignment

An expression contains relational, assignment and arithmetic operators. In the absence of parentheses, the order of evaluation will be A. assignment, relational, arithmetic B. arithmetic, relational, assignment C. relational, arithmetic, assignment D. assignment, arithmetic, relational

C. an instance of a class

An object is _____ A. a category of classes B. a name given to a class C. an instance of a class D. the same as a class

C. Default arguments

Which of the following concept of oops allows compiler to insert arguments in a function call if it is not specified? A. Call by value B. Call by reference C. Default arguments D. Call by pointer

B. Encapsulation

Which of the following concepts means wrapping up of data and functions together? A. Abstraction B. Encapsulation C. Inheritance D. Polymorphism

C. Composition

Which of the following concepts provides facility of using object of one class inside another class? A. Encapsulation B. Abstraction C. Composition D. Inheritance

A. Diamond

Which of the following flowchart symbols represents the if selection structure? A. Diamond B. Hexagon C. Oval D. Parallelogram

D. class

Which of the following is an abstract data type? A. int B. double C. string D. class

D. Sorting

Which of the following is not a programming control structure? A. Repetition B. Selection C. Sequence D. Sorting

C. ASM

Which of the following is the common abbreviation for Assembly Language? A. ASS B. ASB C. ASM D. ASY

A. '7.15 pm'

Which of the following is(are) invalid string constant(s)? A. '7.15 pm' B. "i like e" C. "7.3el2" D. "1234el2"

A. machine code

Which of the following isn't a characteristic of High level languages? A. machine code B. platform independent C. interactive execution D. user-friendly

D. a zero-length string

You typically initialize a String variable to _____ A. an asterisk B. a space enclosed in single quotes C. the number 0 D. a zero-length string

C. Debugging

_____ refers to the process of locating and removing the errors in a program A. Analyzing B. Correcting C. Debugging D. Executing

B. compiler

_______ is a program that converts high-level language to assembly language. A. assembler B. compiler C. interpreter D. linker

B. initialization

The statement double total = 0.0; performs _____ A. assignment B. initialization C. rationalization D. polymorphism

A. an algorithm

The step-by-step instructions that solve a problem are called _____ A. an algorithm B. a list C. a plan D. a sequential structure

C. logical operators

The two operators && an || are A. arithmetic operators B. equality operators C. logical operators D. relational operators

D. header and body

The two parts of a function are the A. header and footer B. declarations and statements C. legs and feet D. header and body

C. Pretest

The while loop is referred to as a(n) ____ loop because the loop condition is tested at the beginning of the loop A. Beginning B. Initial C. Pretest D. Priming

B. area = 5

Which of the following assigns the number 5 to the area variable? A. area 1 = 5 B. area = 5 C. area == 5 D. area --> 5

C. Low-level language

A language which is close to that used within the computer is A. High-level language B. Assembly language C. Low-level language D. All of the above

D. A program which translates source program into object program

A compiler means A. A person who compiles source programs B. The same thing as a programmer C. Keypunch operator D. A program which translates source program into object program

C. Micro

A detailed flowchart is called ______ A. Stack B. Macro C. Micro D. Union

D. scalar type

A fundamental type such as int or double is a ___. A. programmer-defined type B. complex type C. nonscalar type D. scalar type

A. Algorithmic language

A notation used to express clearly on algorithm is known as A. Algorithmic language B. Assembly language C. Machine language D. High level language

A. class

A pattern for creating an object is called a(n) _____ A. class B. attributes C. Private D. public

B. Interpreter

A program that can execute high-level language programs. A. Compiler B. Interpreter C. Sensor D. Circuitry

B. knowledge of a general category can be applied to more specific objects

Inheritance is the principle that A. classes with the same name must be derived from one another B. knowledge of a general category can be applied to more specific objects C. C++ functions may be used only if they have logical predecessors D. one function name may invoke different methods

C. Plato is to philosopher

Object is to class as _____ A. library is to book B. mother is to daughter C. Plato is to philosopher D. president is to Lincoln

A. Character

The String data type is an extension of the _____ data type A. Character B. Double C. Letter D. Long

B. a member of an array

The element of an array is A. the name of the array B. a member of an array C. a value assigned to an array D. All of the above

B. the first character in the string

The first element in a string is A. the name of the string B. the first character in the string C. the length of the string D. the name of the array holding the string

C. Selection

The instruction "If it's raining outside, then take an umbrella to work" is an example of the _____ structure. A. Control B. Repetition C. Selection D. Sequence

A. Diamond

The loop condition in a flowchart is represented by a(n) _____ A. Diamond B. Oval C. Parallelogram D. Rectangle

A. Character

The most efficient data type for a variable that stores the letter C is the _____ data type A. Character B. Double C. Float D. Long Integer

C. numeric literal

The number 5.5e3 is a _____ constant A. character literal B. named literal C. numeric literal D. string literal

C. object file

The output of an assembler is called? A. data file B. task file C. object file D. program file

D. Flowcharting

The process of drawing a flowchart for an algorithm is called __________ A. Performance B. Evaluation C. Algorithmic Representation D. Flowcharting

A. syntax

The rules to any programming language are its __. A. syntax B. interpretation C. logic D. customs

D. Sequence

The set of instructions for how to tie a bow is an example of the _____ structure. A. Control B. Repetition C. Selection D. Sequence

D. Sequence

The set of instructions for how to tie a bow is an example of the _____ structure. A. Control B. Repetition C. Selection D. Sequence

C. inheritance

To be called object-oriented, a programming language must allow A. functions that return only a single value B. #include files C. inheritance D. All of the above

D. a syntax error

Typing the function's name as Main, rather than main, is an example of A. an entry error B. a function error C. a logic error D. a syntax error

D. Abstraction

Which feature can be implemented using encapsulation? A. Polymorphism B. Overloading C. Inheritance D. Abstraction

A. Polymorphism

Which feature of OOP is exhibited by the function overriding? A. Polymorphism B. Encapsulation C. Abstraction D. Inheritance

B. Inheritance

Which of the following provides a reuse mechanism? A. Abstraction B. Inheritance C. Dynamic binding D. Encapsulation

B. Object is an instance of a class.

Which of the following statement is correct? A. Class is an instance of object. B. Object is an instance of a class. C. Class is an instance of data type. D. Object is an instance of data type.

B. Member function

Which of the following term is used for a function defined inside a class? A. Member Variable B. Member function C. Class function D. Classic function

C. Singleton class

Which of the following type of class allows only one object of it to be created? A. Virtual class B. Abstract class C. Singleton class D. Friend class


Set pelajaran terkait

Introduction to MLA Documentation

View Set

Product life cycle and strategies

View Set

EMT - Chapter 15 - Shock & Resuscitation

View Set