CSFINALS

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

String Constant

A character or group of characters enclosed in double quotation marks ( " ). The numbers 0-9, letters a-z or A-Z and all special characters like a space, % $ - _ & etc. may be included

FLOWCHARTS

A diagram of a sequence of steps that a program must perform to produce the desired output.

Sentimental value

A value that Is used as a condition for terminating a loop.

c.

A variable with____ scope has storage created for it by a declaration statement located outside any function. a. local b. internal c. global d. external

infinite

A(n) ____ loop is a loop that never ends.

Repetition

A(n) ____ statement both defines the boundaries containing the repeating section of code and controls whether the code will be executed.

break

A(n) ____ statement forces an immediate exit from the switch, while, for and do-while statements.

PSEUDOCODE

An outline of a program.

while

Both the ____ and the for loop are examples of a pre test loop

a.

C++ provides the capability of using the same function name or more than one function, referred to as function________. a. overloading b. prototyping c. interpreting d. conditioning

input process output

DATA PROCESSING CYCLE The process of converting data into useful and meaningful information:

b.

Data type that signify that the UDF does not have a return type. a. return b. void c. int d. char

By changing number of Arguments. By having different types of argument.

Different ways to Overload a Function

a.

In C++ a reference parameter is declared with the syntax: a. dataType &refVar d. dataType *refVar c. dataType *refVar& d. dataType refVar&

=

In C++, the __symbol is called the assignment operator.

sum += 10

In C++, the expression sum = sum + 10 can be written as

row

In a nested loop, the outer loop is represented by

pretest

In a(n) ____ loop, the condition is tested before any statements in the loop are executed.

Pre test loop

The type of loop where condtion is tested before it proceed to the body of the loop

operands

can be a constant, variable, and or an array element.

operators

can be arithmetic, logical, relational and/or string

INFORMATION

data that has been organized and processed so that it is meaningful. It is essential for effective performance of management functions of planning, organizing, directing, and controlling for effective internal operations and external reporting.

Program Flowcharts

depicts a main segment of a complete computer program.`

Expressions

is a group of program elements consisting of operands and operators.

switch

is a multiway selection statement with this syntax :

Local variables

is a variable that is given local scope.

functions

is a way of modularizing your program

Function overloading

is usually used to enhance the readability of the program.

Numeric Constant

may be an integer (whole number) or a real number (with a decimal place). It may be preceded by a positive or negative sign.

b.

passing addresses is referred to as a function _______ a. passing by value b. passing by reference c. call by value d. pass by copy

System Flowchart

present the total picture without worrying about taking care of every detail.

Local variables

references in the function or block in which it is declared override the same variable name in the larger scope.

b.

the names in parentheses in the header are called the formal____ of the function. a. variables b. parameters c. identifiers d. constants

false

true or false All looping statement must have initialization, condition, and update

true

true or false Another term for a program or set of program is software.

true

true or false C++ for statements is virtually interchangeable with its while statements.

true

true or false C++ functions are constructed to be independent modules

true

true or false C++ is a case sensitive programming language

true

true or false C++ is predominantly a compiled language

true

true or false Calling a function and passing arguments by value is a distinct advantage of C++

false

true or false In a nested loop, the inner loop is represented by the row

false

true or false In a nested loop, the outer loop is represented by the column

false

true or false In flowcharting, the terminal symbol is used for input and output.

false

true or false Nested loop can only be implemented if you use the same looping statement in both the inner and outer loop. Example: Outer is for loop and inner is also for loop, outer is while loop and inner is also while loop, and outer is do-while loop and inner is also do-while loop.

true

true or false Numbers sent to cout are normally displayed left-justified in the display field.

false

true or false Programs in C++ can have more than one main() function.

true

true or false Selection provides the capability to make a choice between different operations, depending on the result of some condition.

false

true or false The construction for ( ; ; ) is invalid.

true

true or false The do - while loop is an example of a post test loop.

true

true or false The do statement is particularly useful in filtering user-entered input and providing data validation checks.

false

true or false The scope of the local variable is all throughout the body of source code.

false

true or false When you are passing the address of a variable to a user defined function it is not necessary to put an ampersand (&)

true

true or false You can solve an iterative programming problem by applying either while, for , or do looping statements

false

true or false all variable must be declared as global variable.

true

true or false function body can also be called as function implementation

true

true or false function body can also be written on top of the main function.

true

true or false function declaration can also be called as a function prototype

true

true or false given the function declaration double quotientAll(int x, floaty); is the correct function overloading? doubleAll(float y, int x);

false

true or false given the function declaration void sumAll(); is this a correct function overloading? int sumAll();

true

true or false ifelse can be a valid identifier in C++.

false

true or false in a user defined function without return type and with parameter list, input is inside the user defined

false

true or false switch can be a valid identifier in C++.

false

true or false the ampersand (&) in function call by reference refers to the content of a variable.

false

true or false variable declaration inside a function is called global variable.

false

true or false when you create the function implementation or function body on top of main, it is referred to have a function declaration.

false

true or falseThe main function can be written as Main.

c.

which is an example of a predefined function? a. Main() b. highest() c. rand() d. letterX()

d.

which is an invalid function overload for the given function declaration? void Q3(char letter); (letter only) a. int Q3(int y); b. int Q3(int y, char &x); c. void (char value); d. float (char value);

FLOWCHARTS

A graphic form of an algorithm.

nested

A loop contained within another loop is called ___ loop.

Program

A set of instructions, written in a specific programming language, which a computer follows in processing data, performing an operation, or solving a logical problem.

return type

In the declaration: char function(int &value); What does char on the left side represents?

address

In the declaration: void function(int &value); What does ampersand (&) represents?

Semicolons

Inside the parenthesis of the for statement are three items, separated by _____.

Variables

Is a portion of the computer's main memory used to store a numeric or string constant. The value stored in the variable must be given a unique variable name but it can only hold one value at a given time.

PSEUDOCODE

It cannot be compiled nor executed.

assembly languages

Programming languages that use symbolic notation like ADD 1, 2 are referred to as __

Software

Programs

Constants

Literal Value that does not change during program execution. It can be of the numeric or string type.

hardware

Physical component of a computer

Defining the Problem Developing Software Requirements Designing the Program Coding the Program Checking out the program by Testing and Debugging Installing and Maintaining the Program Documentation

THE PROGRAMMING CYCLE

if-else

The _______statement in C++ is used to implement a decision structure in its simplest form—choosing between two alternatives.

prototype

The declaration statement for a function is referred to as a function

true

The do while construct is an example of a posttest loop

Global variables

are variables whose contents can be accessed anywhere in a program,

PSEUDOCODE

There is no real formatting or syntax rules

FLOWCHARTS

Traditional tool of programmers which allow flexibility in terms of detail to be included.

True

True or false In the implementation of a nested loop, an outer loop can be represented by a for loop and an inner loop can be presented by a while loop.

1

What will be the last output of variable ctr in the given loop statement? Ctr =1 Do { Cout <<ctr<<"\t"; Ctr++; } while (ctr>=10);

10

What will be the last value of variable ctr in the given loop statement? For (ctr = 0; ctr < 10; ctr ++) { cout <<ctr<<"\t"; }

a flowchart

When diagrams are used to describe the algorithm, the description is referred to as

d.

Which is an example of a user defined function? (letter only) a. pow(x, y) c. rand() b. toupper(retry) d. highest()

b.

Which is not example of a predefined function? (letter only) a. srand(time(0)); c. tolower(retry) b. letterN(); d. main()

c.

Which of the following is the correct function overload of this UDF? void function(int x, int y); (letter only) a. int function(char x, char y); c. void (int y, int x); b. float function(int a, int b); d. char (int x, int y);

DATA

a collection of facts relating to events that take place. These facts could be in the form of numbers, letters, special symbols or combination of these.

arrays

a series of simple variables grouped together under one single variable.

b.

a variable declared inside a function is called__________ a. formal b. local c. global d. parameter

Expressions

always yield a value of a certain type depending on the type of expressions used.

Statements

are keywords, which perform a predefined procedure

a.

in the declaration int function(); the data type int represents the______. a. return type b. function name c. parameter d. call by reference


Set pelajaran terkait

Foundations PrepU Chapter 3 Practice

View Set

Anatomy Exam 4: Digestive System

View Set

Atrology chpt 7 , Astronomy Chpt 6, Astronomy Chpt 5

View Set

Principles of Marketing: Exam 2, Chapter 5-3 to 5-5

View Set