Given the following array what is the first element

Assignment Help Basic Computer Science
Reference no: EM131848509

Can someone please help me with these questions.

Question 1

Given the following array what is the first element?

int list[5] = {0, 5, 10, 15, 20};

A) 0

B) 5

C) 15

D) 20

Question 2

Given the following code fragment, what is the final value of variable output?

int myArr[5] = {1,2,3,4,5};

int output = 0;

output = myArr[0] + myArr[4];

A) 9

B) 8

C) 7

D) 6

Question 3

Given the following code fragment, what is the final value of variable output?

int myArr[5] = {1,2,3,4,5};

int output = 0;

output = myArr[2] + myArr[3];

A) 9

B) 8

C) 7

D) 6

Question 4

Given the following code fragment, what is the final value of variable output?

int myArr[5] = {1,2,3,4,5};

int output = 0;

output = myArr[2] + myArr[4];

A) 9

B) 8

C) 7

D) 6

Question 5

Given the following code fragment, what is the final value of variable output?

int myArr[5] = {1,2,3,4,5};

int output = 0;

output = myArr[1] + myArr[2] + myArr[3];

A) 9

B) 8

C) 7

D) 6

Question 6

Given the following code fragment, what is the final value of variable output?

int myArr[5] = {1,2,3,4,5};

int output = 0;

for (int j = 0; j < 3; j++) {

  output = output + myArr[j];

}

A) 9

B) 8

C) 7

D) 6

Question 7

Given the following code fragment, what is the final value of variable output?

int myArr[5] = {1,2,3,4,5};

int output = 0;

for (int j = 2; j < 4; j++) {

  output = output + myArr[j];

}

A) 9

B) 8

C) 7

D) 6

Question 8

Given the following code fragment, what is the final value of variable output?

int myArr[5] = {1,2,3,4,5};

int output = 0;

for (int j = 0; j < 4; j++) {

  output = output + myArr[j];

}

A) 10

B) 8

C) 7

D) 6

Question 9

Given the following code fragment, what is the final value of variable output?

int myArr[5] = {1,2,3,4,5};

int output = 0;

for (int j = 0; j < 5; j++) {

  output = output + myArr[j];

}

A) 10

B) 8

C) 7

D) 15

Question 10

Given the following array what is the last element?

int list[5] = {0, 5, 10, 15, 20};

A) 0

B) 5

C) 15

D) 20

Question 11

Given the following array what is the second element?

int list[5] = {0, 5, 10, 15, 20};

A) 0

B) 5

C) 15

D) 20

Question 12

Given the following array what is the value of index 0?

int list[5] = {0, 5, 10, 15, 20};

A) 0

B) 5

C) 15

D) 20

Question 13

Given the following array what is the value of index 1?

int list[5] = {0, 5, 10, 15, 20};

A) 0

B) 5

C) 15

D) 20

Question 14

Given the following array what is the value of index 4?

int list[5] = {0, 5, 10, 15, 20};

A) 0

B) 5

C) 15

D) 20

Question 15

What is the size of the following array?

int list[5] = {0, 5, 10, 15, 20};

A) 5

B) 6

C) 7

D) 8

Question 16

Select the array that declares and initializes whole numbers?

A) int list[5] = {0, 5, 10, 15, 20};

B) double list[5] = {0.0, 5.0, 10.0, 15.0, 20.0};

C) char list[5] = {'0', '5', '7', '8', '9'};

D) bool list[5] = {true, false};

Question 17

Which of the following declares but does not initialize an array?

A) int list[5];

B) int list[5] = {0, 5, 10, 15, 20};

C)int list[] = {0, 5, 10, 15, 20};

D) int list[5] = {0};

Question 18

Select the array that declares and initializes real numbers?

A) int list[5] = {0, 5, 10, 15, 20};

B) double list[5] = {0.0, 5.0, 10.0, 15.0, 20.0};

C) char list[5] = {'0', '5', '7', '8', '9'};

D) bool list[5] = {true, false};

Question 19

Select the array that declares and initializes boolean values?

A) int list[5] = {0, 5, 10, 15, 20};

B) double list[5] = {0.0, 5.0, 10.0, 15.0, 20.0};

C) char list[5] = {'0', '5', '7', '8', '9'};

D) bool list[5] = {true, false};

Question 20

Select the array that declares and initializes char values?

A) int list[5] = {0, 5, 10, 15, 20};

B) double list[5] = {0.0, 5.0, 10.0, 15.0, 20.0};

C) char list[5] = {'0', '5', '7', '8', '9'};

D) bool list[5] = {true, false};

Question 21

Given the following C++ code fragment, what is eventually displayed on the screen?

string sentence = "It is cloudy and warm.";

cout << sentence.at(6);

A) c

B) l

C) o

D) u

Question 2210 pts

Given the following C++ code fragment, what is eventually displayed on the screen?

string sentence = "It is cloudy and warm.";

cout << sentence.at(11);

A) a

B) w

C) c

D) y

Question 23

Given the following C++ code fragment, what is eventually displayed on the screen?

string sentence = "It is cloudy and warm.";

cout << sentence.at(4);

A) w

B) s

C) a

D) m

Question 24

Given the following C++ code fragment, what is eventually displayed on the screen?

string sentence = "It is cloudy and warm.";

cout << sentence.at(6);

A) c

B) l

C) one

D) u

Question 25

Given the following C++ code fragment, what is eventually displayed on the screen?

string sentence = "It is cloudy and warm.";

cout << sentence.at(8);

A) c

B) l

C) o

D) u

Question 26

Given the following C++ code fragment, what is eventually displayed on the screen?

string sentence = "It is cloudy and warm.";

cout << sentence.at(9);

A) c

B) l

C) o

D) u

Question 27

Given the following C++ code fragment, what is eventually displayed on the screen?

string sentence = "Outside it is cloudy and warm";

string str = "cloudy";

cout << sentence.find("is");

A) 11

B) 10

C) 9

D) 8

Question 28

Given the following C++ code fragment, what is eventually displayed on the screen?

string sentence = "Outside it is cloudy and warm";

string str = "cloudy";

cout << sentence.find("and");

A) 11

B) 21

C) 31

D) 41

Question 29

Given the following C++ code fragment, what is eventually displayed on the screen?

string sentence = "Outside it is cloudy and warm";

string str = "cloudy";

cout << sentence.find('s');

A) 1

B) 2

C) 3

D) 4

Question 30

Given the following C++ code fragment, what is eventually displayed on the screen?

string sentence = "Outside it is cloudy and warm";

string str = "cloudy";

cout << sentence.find(str);

A) 44

B) 34

C) 24

D) 14

Question 31

*Given the following C++ code fragment, what is eventually displayed on the screen?

string sentence = "Outside it is cloudy and warm";

string str = "cloudy";

cout << sentence.find("is");

A) 11

B) 14

C) 21

D) 25

Question 32

Given the following C++ code fragment, what is eventually displayed on the screen?

string temp = "Rob";

temp.insert(3, "ert");

cout << temp;

A) Robert

B) Rob

C) ert

D) treboR

Question 33

Given the following C++ code fragment, what is eventually displayed on the screen?

string temp = "Pine";

temp.insert(4, "apple");

cout << temp;

A) Pine

B) apple

C) Pineapple

D) elppaeniP

Question 34

Given the following C++ code fragment, what is eventually displayed on the screen?

string temp = "rest";

temp.insert(2, "room");

cout << temp;

A) moortser

B) restroom

C) roomrest

D) reroomst

Question 35

Given the following C++ code fragment, what is eventually displayed on the screen?

string sentence = "It is cloudy";

cout << sentence.length();

A) 11

B) 13

C) 12

D) 10

Question 36

Given the following C++ code fragment, what is eventually displayed on the screen?

string sentence = "Citrus College";

cout << sentence.length();

A) 13

B) 21

C) 31

D) 14

Question 37

Given the following C++ code fragment, what is eventually displayed on the screen?

string sentence = "length";

cout << sentence.length();

A) 5

B) 6

C) 7

D) 8

Question 38

Given the following C++ code fragment, what is eventually displayed on the screen?

string sentence = "College";

cout << sentence.length();

A) 13

B) 6

C) 7

D) 14

Question 39

Given the following C++ code fragment, what is eventually displayed on the screen?

string sentence = "It is cloudy and warm.";

cout << sentence.substr(0,5);

A) cloudy

B) It is

C) and

D) warm

Question 40

Given the following C++ code fragment, what is eventually displayed on the screen?

string sentence = "It is cloudy and warm.";

cout << sentence.substr(6,6);

A) It is

B) cloudy

C) and

D) warm

Reference no: EM131848509

Questions Cloud

Differences between ntfs disk quotas and fsrm quotas : What are the differences between NTFS disk quotas and FSRM quotas? How do each actually determine usage?
Identify a change or innovation that benefit current field : Identify a change or innovation that would benefit your current field of specialization(Emergency Management Specialist)
Follow the comments in the code : Follow the comments in the code, as these include more instructions. The code should be able to calculate the total and then add the tax of 2.3
Research on security vulnerabilities associated with scada : Research on security vulnerabilities associated with SCADA and digital industrial control systems. Summarize the major security concerns .
Given the following array what is the first element : Given the following array what is the first element?
Describe key components of strategic planning process : Identify the strategic planning outcomes. Keep in mind that outcomes should be specific and measurable. Describe key components of strategic planning process.
Compute the profit and loss from only the repo transaction : Compute the profit/loss from ONLY the Repo transaction. Which of these bonds will you use for the Repo transaction?
How woud you evaluate each company profitability : Based off of the computations attached, How woud you evaluate each Company's profitability?
Determine the equivalent discount rate : Determine the equivalent discount rate for the following? periods: a. Six months b. One year c. One month

Reviews

Write a Review

Basic Computer Science Questions & Answers

  Identifies the cost of computer

identifies the cost of computer components to configure a computer system (including all peripheral devices where needed) for use in one of the following four situations:

  Input devices

Compare how the gestures data is generated and represented for interpretation in each of the following input devices. In your comparison, consider the data formats (radio waves, electrical signal, sound, etc.), device drivers, operating systems suppo..

  Cores on computer systems

Assignment : Cores on Computer Systems:  Differentiate between multiprocessor systems and many-core systems in terms of power efficiency, cost benefit analysis, instructions processing efficiency, and packaging form factors.

  Prepare an annual budget in an excel spreadsheet

Prepare working solutions in Excel that will manage the annual budget

  Write a research paper in relation to a software design

Research paper in relation to a Software Design related topic

  Describe the forest, domain, ou, and trust configuration

Describe the forest, domain, OU, and trust configuration for Bluesky. Include a chart or diagram of the current configuration. Currently Bluesky has a single domain and default OU structure.

  Construct a truth table for the boolean expression

Construct a truth table for the Boolean expressions ABC + A'B'C' ABC + AB'C' + A'B'C' A(BC' + B'C)

  Evaluate the cost of materials

Evaluate the cost of materials

  The marie simulator

Depending on how comfortable you are with using the MARIE simulator after reading

  What is the main advantage of using master pages

What is the main advantage of using master pages. Explain the purpose and advantage of using styles.

  Describe the three fundamental models of distributed systems

Explain the two approaches to packet delivery by the network layer in Distributed Systems. Describe the three fundamental models of Distributed Systems

  Distinguish between caching and buffering

Distinguish between caching and buffering The failure model defines the ways in which failure may occur in order to provide an understanding of the effects of failure. Give one type of failure with a brief description of the failure

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd