Health
Health, 05.11.2020 16:00, mbrisen7420

Three students, studying the use of arrays, presented the following statements.

I - The first student developed code 1 and concluded that his code makes use of

correct array and C ++ language.

#include <iostream>

using namespace std;

int main () {

int i, j, m [12] [12];

for (i = 0; i <12; i ++) {

for (j = 0; j <12; j ++) {

m [i] [j] = j% 2 - 1;

}

}

for (i = 0; i <12; i ++) {

for (j = 0; j <12; j ++) {

m [i] [j] = -1 - m [i] [j];

}

}

}

Code 1
II - The second student developed code 2 and concluded that his code does

correct use of arrays and the C ++ language.

#include <iostream>

using namespace std;

int main () {

double a [10] [5] = {{10}, {5}, {6}}, x [5] = {5}, b [10] = {1};

int i, j, m = 10, n = 5;

for (i = 0; i <m; i ++) {

b [i] = 10.0;

for (j = 0; j <n; j ++) {

b [i] = b [i] + a [i] [j] * x [j];

}

}

}

Code 2

III - The third student developed code 3 and concluded that his code makes use of

correct array and C ++ language. # include <iostream>

#include <iostream>

using namespace std;

const int N = 2;

int main () {

int i, j, k, a [N] [N] = {2,0,0,1}, b [N] [N] = {1,1,1,1}, c [N] [N] = {1,2,3,4};

for (i = 0; i <N; i ++) {

for (j = 0; j <N; j ++) {

c [i] [j] = 0;

for (k = 0; k <N; k ++) {

c [i] [j] + = a [i] [k] * b [k] [j];

}

}

}

}

Code 3
Check the correct alternative:

a) Only alternative I is true

b) Only alternative II is true

c) Alternatives I and II are true

d) Alternatives II and III are true

e) All statements are true

answer
Answers: 2

Other questions on the subject: Health

image
Health, 23.06.2019 03:00, emma5743
Early treatment for mental illness involved because doctors believed that doing this would drain the mental illness out of the person’s body.
Answers: 1
image
Health, 23.06.2019 16:00, jshhs
Drug categories matching. match the term in column 1 with the associated term in column 2. antihistamine antipsychotic analgesic antidiabetic anticholinergic beta-agonists anti-alzheimer ssri antianxiety corticosteroid cytotoxic antifungal antiviral quinolone cephalosporin rapid-acting insulin antiemetics anti-acidity antihyperlipidemics vasodilators antiarrhythmics calcium channel blockers beta blockers angiotensin ii receptor blockers diuretics digitalis preparations antiosteoporosis drug antiplatelet drug local anesthesia ipratropium simvastatin aricept dolasetron ciprofloxacin digoxin aripiprazole sotalol acyclovir valsartan hydralazine nsaid
Answers: 1
image
Health, 23.06.2019 21:00, mattmore0312
Sadie and her mom were at a hardware store to purchase smoke detectors for their new home. sadie's mom was unsure how many units she should purchase. what is the general recommendation? a. one large one for the middle of the house b. every room in the house should have one c. kitchen, garage and laundry room- since those are where most fires happen d. every living area including the hallway by the bedrooms should have a smoke detector.
Answers: 1
image
Health, 24.06.2019 01:00, codyshs160
Those with high self-esteem generally live a more fulfilling life and have better relationships. select the best answer from the choices provided. t f
Answers: 1
Do you know the correct answer?
Three students, studying the use of arrays, presented the following statements.

I - The...

Questions in other subjects:

Konu
Spanish, 26.06.2019 19:00