Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

QUESTION 1 Logical operators are used to create: A. functions from other functions B. relational expressions from other relational expressions C. conditions from other conditions

QUESTION 1 Logical operators are used to create:

A. functions from other functions

B. relational expressions from other relational expressions

C. conditions from other conditions

D. assignment operators

QUESTION 2 With modular programming we break a program up into smaller, manageable functions or modules

True

False

QUESTION 3 A function must know the following about a function before it is called:

A. name, string type, number of variables, data type of each variable

B. return type, main(), number of variables, data type of each variable

C. number of parameters, integer type, number of variables, return type

D. name, return type, number of parameters, data type of each parameter

QUESTION 4 Arrays and Vectors are two types of

A. functions

B. return type

C. data structures

D. Object Oriented Programming

QUESTION 5 Unlike regular variables, these can hold multiple values

A. constants

B. named constants

C. arrays

D. floating-point variables

E. None of the above

QUESTION 6 Which of the following is a valid C++ array definition?

A. int array[0];

B. float $payments[10];

C. void numbers[5];

D. int array[10];

E. None of the above

QUESTION 7 The Statement int grades [] = {100, 90, 99, 80 }

A. implicit array sizing

B. an illegal array declaration

C. an illegal array initialization

D. default argument

E. None of the above

QUESTION 8 A function can have zero to many parameters, and it can return this many values:

A. zero to many

B. no

C. only one

D. a maximum of ten

QUESTION 9 A function that calls itself either directly or indirectly is a recursive function

True

False

QUESTION 10 Given the following function definition:

void calc (int a, int& b)

{

int c; c = a + 2; a = a * 3; b = c + a;

}

What is the output of the following code fragment that invokes calc? (All variables are of type int)

x = 1;

y = 2;

z = 3;

calc(x, y);

cout << x << " " << y << " " << z << endl;

A. 1 2 3

B. 1 6 3

C. 3 6 3

D. 1 14 9

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Introduction To Data Mining

Authors: Pang Ning Tan, Michael Steinbach, Vipin Kumar

1st Edition

321321367, 978-0321321367

More Books

Students also viewed these Databases questions

Question

1. Specify (the values for H).

Answered: 1 week ago