The HEIGHT variable will be used to hold the index numbers of the rows in a multidimensional array. The WIDTH will be used to hold the index numbers of the columns. Which of the following completed for loop could fill that previously declared anArray multidimensional array with the value 0 in each position?(a) for (int n=0; n < HEIGHT; n++) { for (int m=0; m < WIDTH; m++) { int anArray[0][0]; }}(b) for (int n=0; n < HEIGHT; n++) { for (int m=0; m < WIDTH; m++) { } anArray[n][m] = 0; }(c) for (int n=0; n < WIDTH; n++) { for (int m=0; m < HEIGHT; m++) { int anArray[n][m] = { {0,0,0}{0,0,0}{0,0,0}{0,0,0|}{0,0,0}}; }}(d) for (int n=0; n < HEIGHT; n++) { for (int m=0; m < WIDTH; m++) { anArray[n][m] = 0; }}

Answers

Answer 1

Answer:

(d) for (int n=0; n < HEIGHT; n++) { for (int m=0; m < WIDTH; m++) { anArray[n][m] = 0; }}

Explanation:

Given

HEIGHT [tex]\to[/tex] rows

WIDTH [tex]\to[/tex] columns

Required

Fill the array with zeros

Assume the array has already been declared

First, we iterate through the rows; using:

for (int [tex]n=0[/tex]; [tex]n < HEIGHT[/tex]; [tex]n++[/tex]) {

Next, we iterate through the columns

for (int [tex]m=0[/tex]; [tex]m < WIDTH[/tex]; [tex]m++[/tex]) {

Then we fill the array with the iterating variables of rows and the columns

anArray[n][m]

Lastly, close the loops

}}


Related Questions

explain how data structures and algorithms are useful to the use of computer in data management

Answers

Answer:

programmers who are competent  in data  structures and algorithms  can easily perform the tasks related  to data processing ,automated reasoning ,or calculations . data structure and algorithms  is significant  for developers  as it shows their problems solving abilities amongst the prospective employers .

Convert the following decimal numbers into their binary equivalent: a. 13
b. 32 or 42
c. 292
d 12
e. 61
f. 120
g.29
h. 44
67
98

Answers

Answer: a. 1101 b. 10000 or 101010 c. 100100100 d. 1100 e. 111101 f. 1111000 g. 11101 h. 101100 1000011 1100010

Your location has been assigned the 172.149.254.0 /24 network. You are tasked with dividing the network into 13 subnets with the maximum number of hosts possible on each subnet.

Required:
a. What is the dotted decimal value for the subnet mask?
b. How many additional bits will you need to mask in the subnet mask?

Answers

The subnet mask would be a 32-bit integer which is formed by assigning the host bits to all 0's and the networking bits to so many 1's.In this method, the subnetting separates the IP address between host and network addresses.The subnet mask covers an IP address with its 32-bit number, thus the term "mask".

Given:

Network IP address [tex]\bold{= 172.149.254.0 /24}[/tex]

Subnet numbers [tex]\bold{= 13}[/tex]

Calculating the borrow bits:

[tex]\to \bold{= ceil(\log_{2} 13) = 4 \ bits}[/tex]

a)

Calculating the dotted decimal value for the subnet mask:

[tex]\to \bold{11111111.11111111.11111111.00000000}\\\\\to \bold{255.255.255.240}\\\\[/tex]

b)

The additional bits which will be needed to mask the subnet mask that is = 4.

Learn more: brainly.com/question/2254014

A choropleth map is used to
Group of answer choices

do a scatter plot.

show live satellite images.

present geographical regions in 3D.

present geographical regions coloured, shaded, or graded according to some variable.

Answers

4- present geographical regions colored, shaded, or graded according to some variable :)

When we have signals within 1-2 MHz band, using a waveguide is the most preferred choice for a transmission line. T or F?​

Answers

Answer:

T

Explanation:

you are the network administrator for a college. wireless access is widely used at the college. you want the most secure wireless connections you can have. which of the following would you use?
A WPA
B WEP2
CWEP
D WPA2

Answers

Answer:

D. WPA2

Explanation:

Required

Of the 4 options, which is the most secured?

WPA was created as a solution to the vulnerabilities in WEP/WEP2. Then, WPA was upgraded to WPA2.

WPA2 is the least vulnerable to hacks because for every user that is connected to the network through WPA2, a unique encryption is made available for such connection.

Hence, the most secure connection, of the 4 is WPA2.

If you were driving the blue Prius in the situation pictured above, explain why the red Mustang should be given right-of-way at this intersection.

Answers

Answer:

The red Mustang should be given the right-of-way at this intersection because:

The red Mustang arrived first before the blue Prius and is closer to the stop sign before the arrival of the blue Prius.  This implies that the red Mustang must have waited for its turn, unlike the blue Prius that just arrived at the intersection.

Explanation:

Traffic laws, regulations, and IPDE defensive driving strategy require that drivers always give way to the vehicle that arrived before them at an intersection.   Assuming that multiple vehicles reach the intersection simultaneously, then the vehicle must be given the right-of-way.  Alternatively, the traffic lights at the intersection should be obeyed and be allowed to regulate the movement of vehicles.  IPDE defensive driving strategy requires drivers to be watchful of their driving spaces to determine the appropriate time to move.

In what tab can a user find the workspace option?

Answers

D. View.
You can find the workspace and preview of the file in View.

Use the tables below to show the difference between the results of a natural join, an equijoin (with PROF_CODE = 2) and a full outer join. Provide the resulting table of each join

Answers

Answer:

Code:

CREATE TABLE student (

stu_code INTEGER PRIMARY KEY,

prof_code INTEGER

);

INSERT INTO student VALUES (100278,null);

INSERT INTO student VALUES (128569,2);

INSERT INTO student VALUES (512272,4);

INSERT INTO student VALUES (531235,2);

INSERT INTO student VALUES (531268,null);

INSERT INTO student VALUES (553427,1);

CREATE TABLE professor (

prof_code INTEGER PRIMARY KEY,

dept_code INTEGER

);

INSERT INTO professor VALUES (1,2);

INSERT INTO professor VALUES (2,6);

INSERT INTO professor VALUES (3,6);

INSERT INTO professor VALUES (4,4);

The SQL NATURAL JOIN is a type of EQUI JOIN and is structured in such a way that, columns with the same name of associated tables will appear once only. In our Example, Prof_code will appear only once and it will be matched in both the table;  

SELECT * FROM Student natural join Professor on student.prof_code=Professor.prof_code ;  

Stud_code   Prof_code  Dept_code

128569        2           6

512272        4           4

531235        2           6

553427        1           2

EQUI JOIN performs a JOIN against equality or matching column(s) values of the associated tables and an equal sign (=) is used as a comparison operator in the where clause to refer to equality. In our example, it will only show the result with prof_code=2 from the natural join result.

SELECT * FROM Student join Professor on student.prof_code=Professor.prof_code where student.prof_code=2;

Stud_code Prof_code Prof_code Dept_code

128569     2         2         6

531235     2         2         6

In SQL the FULL OUTER JOIN combines the results of both left and right outer joins and returns all (matched or unmatched) rows from the tables on both sides of the join clause.

SELECT * FROM professor full outer join student on professor.prof_code=student.prof_code ;

Stud_code Prof_code Prof_code Dept_code

100278                

128569    2          2         6

512272    4          4         4

531235    2          2         6

531268    

                    3         6

553427    1          1         2

A hammer tool can only be used by one technician at a time to perform hitting. Accordingly, you have developed a Hammer class with a hit method. Objects of class Hammer are used to simulate different hammers, while threads are created to simulate users. Which situation needs to add the synchronized keyword to the hit method

Answers

Answer:

Explanation:

The synchronized keyword needs to be active on the hit method at any point where 2 or more threads (users) exists at any given moment. This is in order to prevent two or more users from trying to perform a hammer hit at the same time. This is what the synchronized keyword is used for. It prevents the more than one thread from calling the specific method at the same time. Instead it adds the action to a sequence so that the second thread calls the hit method only after the first thread's hit method finishes.

Who innovated an aeroplane? ​

Answers

Answer:

White brothers!!

Explanation:

So, I need to use an external mic for my phone, but the problem is that I need a "dual mic adapter". My dad gave me an "audio splitter" instead. Can I use the audio splitter instead in order to connect the external mic to my phone???​

Answers

But you can't use this device alone to connect two microphones to your USB C port and expect it to have usable volume. So the description is somewhat misleading ...

Imagine that you wanted to write a program that asks the user to enter in 5 grade values. The user may or may not enter valid grades, and you want to ensure that you obtain 5 valid values from the user. Which nested loop structure would you use?
A. A "for" loop inside of a "while" loop
B. A "while" loop inside of a "for" loop
C. None of the above
D. Either a or b would work

Answers

The type of nested loop which I would use to write the program is:

B. A "while" loop inside of a "for" loop

What is a Loop?

This refers to the control flow statement which is used to iterate and lets a particular line(s) of code execute repeatedly

With this in mind, we can see that the type of nested loop which I would use to write the program is a "while" loop inside of a "for" loop because it is a conditional statement that continues to ask for the certain valid grades until it gets the right one.

Therefore, the correct answer is option B

Read more about loops here:
https://brainly.com/question/26098908

advantages of computational skill

Answers

Explanation:

algorithmic thinking - developing a set of instructions or sequence of steps to solve a problem;

evaluation - ensuring a solution is fit-for-purpose;

decomposition - breaking a problem down into its component parts;

Neymar machine that Run on electricity

Answers

"Neymar" = "name a"?

if so, well, there are many, like the little glowing box you use the type questions to the brainliest community, let it be a phone, a pc, or a molded Nintendo

if you meant Neymar indeed, I'm not sure if he runs on electricity, unless he is a soccer playing android somehow.

Write the code for the following problem.
Add a function to problem to display the last name and highest, last name and lowest and average exam score. Hint: for highest initialize a variable to 0 (high_var). If the array value is higher than the high_var then set high_var to the array value and set high_index to the position of the array. Proceed through the array until you get to the end. Do the same for finding the lowest using low_var set to 999 (higher than the highest value). For the average score, sum all the exam scores as you proceed through the loop. Use a for loop to go through each occurrence of the arrays. Note you can do all this with one for loop but if it makes more sense to you to use multiple for loops that is ok too.

Answers

Answer:

no

Explanation:

Create union integer with members char c, short s, int i and long b. Write a program that inputs the values of type char, short, int, and long and stores the values in union variables of type union integer. Each union variable should be printed as a char, a short, an int and a long. D the values always print correctly? Also create pseodocode or flowchart.
Here is the feedback that I received when I originally turned this in:
I have the following concerns: You need to save your program file with a .c extension. You should declare your union above the main module and then utilize it from within this portion. You have declared the union and then created a function definition prior to entering the main() function.
Here is the original code provided by homework help: Thanks in advance
#include
union myUnion {
char c;
short s;
int i;
long l;
};
void print(myUnion u) {
printf("As a character: %c\n", u.c);
printf("As a short: %hd\n", u.s);
printf("As an int: %d\n", u.i);
printf("As a long: %ld\n\n", u.i);
}
int main() {
myUnion u;
printf("Please enter a character: ");
scanf("%c", &(u.c));
print(u);
printf("Please enter a short: ");
scanf("%hd", &(u.s));
print(u);
printf("Please enter an int: ");
scanf("%d", &(u.i));
print(u);
printf("Please enter a long: ");
scanf("%ld", &(u.l));
print(u);
return 0;

Answers

Answer:

The updated program in C is as follows:

#include <stdio.h>

union myUnion{ char c; short s; int i; long l; };

int main(){

   union myUnion inputs;

   printf("Character: ");    scanf("%c", &inputs.c);

   printf("Output: %c", inputs.c);

   printf("\nShort: ");    scanf("%hd", &inputs.s);

   printf("Short: %hd", inputs.s);

   printf("\nInteger: ");    scanf("%d", &inputs.i);

   printf("Output: %d", inputs.i);

   printf("\nLong: ");    scanf("%ld", &inputs.l);

   printf("Long: %ld", inputs.l);

   return 0;

   }

The pseudocode is as follows:

Function union myUnion {

character; short; int; long

}

main() {

myUnion inputs;

Input inputs.c;  Print inputs.c

Input inputs.s; Print inputs.s

Input inputs.i; Print inputs.i;

Input inputs.l; Print inputs.l

}

Explanation:

This defines the union function

union myUnion{ char c; short s; int i; long l; };

The main begins here

int main(){

This calls the union function to main

   union myUnion inputs;

This prompts and gets input for character variable

   printf("Character: ");    scanf("%c", &inputs.c);

This prints the character input

   printf("Output: %c", inputs.c);

This prompts and gets input for short variable

   printf("\nShort: ");    scanf("%hd", &inputs.s);

This prints the short input

   printf("Short: %hd", inputs.s);

This prompts and gets input for integer variable

   printf("\nInteger: ");    scanf("%d", &inputs.i);

This prints the integer input

   printf("Output: %d", inputs.i);

This prompts and gets input for long variable

   printf("\nLong: ");    scanf("%ld", &inputs.l);

This prints the long input

   printf("Long: %ld", inputs.l);

   return 0;

   }

Carlos manages a Linux system that users are able to SSH into in order to perform certain tasks. However, he has just installed a critical patch and wants to reboot the server to ensure that it has fully taken effect. Which of the following commands should he use to ensure that a reboot will not interrupt any logged in users?

a. w
b. id
c. whoami
d. uname -a

Answers

The answer is "Option b" which is "id", and its further calculation can be defined as follows:

In the Linux system, the id command is being used to find out the account and main indicators and numeric IDs of a current user and any other user on the system. In this, command the User name and genuine user ID.It is used to list all the groups of which a user is a member, and also display the security context of the current user.

The wrong choice can be defined as follows:

In choice a, "w" is the use full command, which displays all users who are currently active.In choice c, "whoami" is used as our user name.In choice d, "uname-a" is used to shows information about the network.

Therefore "Choice b" is the correct answer.

Learn more:

Linux system: brainly.com/question/3133247

consider a hard disk with the following specifications :
3.5 in diameter

Answers

Answer:

usable capacity = 10 GB

Number of cylinders = 256

Block size = 4 KB

(1)Bytes in each cylinder = (10*230)/(256) = (10*222) = 40 MegaBytes

(2)Number of Blocks in each cylinder = (10*222)/(212) = 10K

(3)capacity of one track = 40 MegaBytes/(10*2) = 2 MB

Rotation speed = 3840 RPM

Number of rotations per second = 3840/60 = 64

Transfer rate = (2*64) = 128 MB/sec

Explanation:

What is hacking? Why is hacking a concern for law enforcement?

Answers

Answer:

hacking is the act of exploitation, and is typically used to steal other people's account. It is a major concern because people can easily lose their account to hackers if they're too gullible, and the hacker can use their victims' accounts to purchase the things that they want with their victims' money.

Hacking is having unauthorized access to data in a computer or a system. It's a huge concern because everything nowadays depends on the internet, and every device connected to the Internet is at risk

(1)similarities between backspace key and delete key. (2) different between backspace key and delete key. (3) explain the term ergonomics. (4) explain the following. a click b right click c double click d triple click e drag and drop​

Answers

Answer:

1.similarity:

they are both editing keys

3.ergonomics are designed keying devices that alleviates wrist strain experienced when using ordinary keyboard for long hours

4.

.a click is pressing and releasing the left mouse button onceright click is pressing the right mouse button once to display a short cut menu with commands from which a user can make a selectiondouble click is pressing the left button twice in rapid successiondrag and drop is where by the user drags an icon or item from one location on the screen to another.

how do you copy a file​

Answers

Answer:

right click and press control c

In the context of the components of a typical expert system, _____ is similar to a database, but in addition to storing facts and figures it keeps track of rules and explanations associated with facts.

Answers

Answer:

Knowledge base.

Explanation:

Artificial intelligence (AI) also known as machine learning can be defined as a branch of computer science which typically involves the process of using algorithms to build a smart computer-controlled robot or machine that is capable of performing tasks that are exclusively designed to be performed by humans or with human intelligence.

Artificial intelligence (AI) provides smarter results and performs related tasks excellently when compared with applications that are built using conventional programming.

Generally, there are two (2) main characteristics of artificial intelligence (AI) systems and these include;

I. Non-algorithmic processing.

II. Symbolic processing.

In artificial intelligence (AI), the field of expert systems is the most important applied area because it models human knowledge.

Hence, expert systems represents knowledge as a set of rules by mimicking the expertise of humans in a particular field to uniquely proffer solutions to a problem.

Although, all expert systems are generally lacking in human capabilities and can only use inference procedures to proffer solutions to specific problems that would normally require human expertise or competence.

Some of the areas where expert systems can be applied are; monitoring, diagnosis, scheduling, classification, design, process control, planning, etc.

Basically, expert systems comprises five (5) main components and these are;

1. Explanation module.

2. Inference Engine.

3. Knowledge acquisition and learning module.

4. User Interface.

5. Knowledge Base.

In the context of the components that makes up an expert system, knowledge base is similar to a database because it is used for storing facts and figures, while keeping track of rules and explanations associated with facts. Thus, giving rise to the knowledge base management system (KBMS).

In the context of the components of a typical expert system, Knowledge base is similar to a database, but in addition to storing facts and figures, it keeps track of rules and explanations associated with facts.

An expert system is a form of artificial intelligence where computer imitate the decision making style of humans.

There are basically two types of the expert system and they are the inference engine and the knowledge base.

The knowledge base consists of the facts and rules and ways of interpreting them to arise to new insights. The inference engine applies logical rules to the knowledge base.

Learn more about knowledge base here:

https://brainly.com/question/9619145

Which one is the result of the output given by a compute

Answers

Answer:

Images.

Sound.

Hardcopy

Answer:

it can be anything like sound or pictures

Explanation:

What is system software? Write its types.​

Answers

Answer:

There are two main types of software: systems software and application software. Systems software includes the programs that are dedicated to managing the computer itself, such as the operating system, file management utilities, and disk operating system (or DOS)

Answer:

There are two main types of software: systems software and application software. Systems software includes the programs that are dedicated to managing the computer itself, such as the operating system, file management utilities, and disk operating system (or DOS)

Explanation:

thanks for question

In regard to segmentation, all of the following are examples of a customer's behavior or relationship with a product EXCEPT: a) user status. b) loyalty status. c) usage rate. d) demographics

Answers

Answer: demographics

Explanation:

Market segmentation refers to the process of dividing the consumers into sub-groups of consumers which are refered to as the segments based on the characteristics shared.

The examples of a customer's behavior or relationship with a product include user status, usage rate and loyalty status.

It should be noted that some examples of market segmentation are behavioral, demographic, geographic, and psychographic. From the options given, demographics is not an example of a customer's behavior with a product.

Discuss the scaled index addressing mode and comments on the following instructions?

a) MOV BX, [CX+5*AX]
b) MOV [DX5*DI+30H], CX

Answers

Memory will also be accessible in Scaled index addressing mode using a 32-bit base & indexing register.The instruction's first parameter will be the base register, and the instruction's second parameter will be the index register. The index register is multiplied by a scaling factor before the program is fetched.

For option a:

The baseline register is [tex]\bold{BX}[/tex], while the index register is [tex]\bold{CX+5*AX}[/tex].

The multiplier for Accumulator [tex]\bold{AX }[/tex] will be 5.[tex]\bold{CX }[/tex] will be multiplied with this value.[tex]\bold{CX+5*AX}[/tex] will contain a memory address.The value at position [tex]\bold{CX+5*AX}[/tex] is accessed by [tex]\bold{[{CX+5*AX} ]}[/tex].The value retrieved from the address [tex][\bold{CX+5*AX}][/tex] is moved into Base register BX by the MOV instruction.

For option b:

Its index register is [tex]\bold{CX }[/tex], whereas the base register is [tex]\bold{DX5*DI+30H}[/tex].

[tex]\bold{CX}[/tex] has a number, that is copied to a computed place below.After multiplying [tex]\bold{DI}[/tex] by [tex]\bold{5, DX}[/tex] will be multiplied by this [tex]\bold{5*DI}[/tex].To the aforementioned multiplied value,[tex]\bold{ 30H}[/tex] will be added.[tex]\bold{[DX5*DI+30H]}[/tex] is a value located at location [tex]\bold{DX5*DI+30H}[/tex]. [tex]\bold{DX5*DI+30H }[/tex] is a memory address number.As a result, the value of [tex]\bold{CX}[/tex] will be copied to the [tex]\bold{ [DX5*DI+30H] }[/tex]location.

Learn more:

brainly.com/question/14319860

viết chương trình hoàn chỉnh các yêu cầu sau:
a. Định nghĩa hàm có tên là PSTG(), có hai tham số kiểu nguyên x và y hàm trả về giá trị phân số x/y ở dạng tối giản.
b. Gọi hàm đã định nghĩa ở trên trong hàm main () để in lên mà hình một phân số x/y ở dạng tối giản, với x và y được nhập từ bàn phím.

Answers

Explanation:

the perimeter of an aluminium sheet is 120 CM if its length is reduced by 10% and its breadth is increased by 20% the perimeter does not change find the measure of the length and the breadth of the sheet

Which Windows installation method requires the use of Windows deployment services (WDS)?
1. Network Installation
2. Repair Installation
3. Bootable flash drive installation
4. Unattended installation​

Answers

Answer:

1. Network Installation

Explanation:

Given

Options (1) to (4)

Required

Which requires WDS for installation

WDS are used for remote installations where users do not have to be physically present before installations can be done; in other words, it is necessary for network based installations.

Of all the given options, (a) is correct because without WDS, network installation cannot be done.

Suppose you have a stack ADT (i.e., an Abstract Data Type that includes operations to maintain a stack. Design a flowchart or suitable logical diagram to show you could implement a queue’s enqueue and dequeue operations using two stacks, stack 1 and stack 2.

Answers

Answer:

One approach would be to move all items from stack1 to stack2 (effectively reversing the items), then pop the top item from stack2 and then put them back.

Assume you use stack1 for enqueueing. So enqueue(x) = stack1.push(x).

Dequeueing would be:

- For all items in stack1: pop them from stack1 and push them in stack 2.

- Pop one item from stack2, which will be your dequeue result

- For all items in stack2: pop them from stack2 and push them in stack 1.

Hope it makes sense. I'm sure you can draw a diagram.

Other Questions
Catalina Island is 8 miles wide and 21 miles long. If one inch of rain falls on Catalina Island, how many cubic feet of rain fell on Catalina Island. (Hint: convert all units to feet first). [tex]( - 72) \div ( + 9) + (16) \div ( - 4)[/tex]could you help..... Just need to know if I answered this correctly please! Identify the segments that are parallel, if any, if ADHECK.A. AE || CBB. AD|| CBC. none of theseD. AC|| CD The time delay between transmission and the arrival of the reflected wave of a signal using ultrasound traveling through a piece of fat tissue was 0.13 ms. At what depth did this reflection occur? (The average propagation speed for sound in body tissue is 1540 m/s) Why is page one of the story the importance of being earnest important? PLEASE HELP!! WHOEVER HELPS FIRST AND GETS IT CORRECT GETS BRAILIEST!! By the way, TWO people need to answer so I can mark brainliest. Which side is the adjacent side to ? what is the role of superstition in rapid population growth solve for w. -9/7=-2/3w-1/2 While you and your little cousin are walking through a natural history museum, she points out the skull of an australopithecine with a large crest on the top and asks you what its purpose was. How might you correctly sum up this complicated evolutionary trait for your little cousin write a letter to your friend whom you have not seen for a long time.tell him what you and your family doing these day? Write the correct noun form of the word given in the brackets.The carpenters worked with (perfect). If a triangular pyramid has a base area of 10ft and a height of 6ft, what is the volume?. 20ft^3. 40ft^3.60ft^3.80ft^3.120ft^3 Una partcula efecta un MAS cuya ecuacin es: x=0,3 cos (2t + /6) m. Determinar: Amplitud, frecuencia angular, fase inicial, periodo, frecuencia de oscilacin y posicin en t=0,25 s please help me guys its important Socialism solution to all problems Give the formula of each coordination compound. Include square brackets around the coordination complex. Do not include the oxidation state on the metal. Use parentheses only around polyatomic ligands.a) potassium tetracyanonickelate(II)b) sodium diamminedicarbonatoruthenate(III)c) diamminedichloroplatinum(II) f (-10) = ?Evaluate piecewise functions What type of bonding is occuring in the compound below?A. Covalent polarB. MetallicC. IonicD. Covalent nonpolar