Question: TRUE/FALSE (a) The statement A[0] = A[0] + 1; adds 1 to the first element of array A. Select one: True False (b) If b

TRUE/FALSE

(a) The statement A[0] = A[0] + 1; adds 1 to the first element of array A.

Select one:

True

False

(b) If b is an array of integer elements, then the statement b[3] *= 2; doubles the value of b[3].

Select one:

True

False

(c) The declaration of an array as int arr[5][3] sets aside 8 memory locations.

Select one:

True

False

(d) The Consider the following code snippet:

int arr[4][5] =

{

{ 1, 2, 3 },

{ 4, 5, 6 }

};

int val = arr[1][2] + arr[1][3];

cout << val;

The output of the given code snippet on execution is 5.

Select one:

True

False

(e) The statement getline(cin,name); gets a persons name until the enter key is hit

Select one:

True

False

(f) The value of the 2nd row 3rd column for the following matrix is 9.

int matrix[3][4] = { { 3, 4, 5, 6}, {7, 8, 9, 10}, {1, 2, 3, 4}}

Select one:

True

False

(g) The result obtained by evaluating the expressions 45 % 7 is __________ .

Select one:

a. 6

b. 3

c. 22

d. 1

e. 0

(h) Which of the following is a valid constant declaration?

Select one:

a. const tax_rate = 0.06;

b. const float 3.14 = pi;

c. float const bonus_amount = 500.00;

d. const float discount = 0.10;

e. const integer tax_deduct = 500;

(i) Which of the following is a valid variable declaration?

Select one:

a. float const_job, temp_job;

b. full_job, temp_job: int;

c. float const_job; temp_job; part_time_job;

d. float const, temp;

e. float const = temp_job;

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!