explain declaration and initialization of one and two dimensional arrays with example

Answers

Answer 1

The declaration and initialization of arrays involves creating and using the arrays

How to declare an array?

Assume the programming language is Java.

To declare and initialize an array, we make use of:

One dimensional array: Data-Type Array-name [] = {List of array values}Two dimensional array: Data-Type Array-name [] [] = {List of array values}

Assume the array name of the one dimensional array is num, and the data type is integer.

The following can be used to declare and initialize the array to have 5 elements

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

Assume the array name of the two dimensional array is num, and the data type is integer.

The following can be used to declare and initialize the array to have 2 rows and 3 columns

int num [][] = {{1,2},{3,4},{5,6}}

Read more about arrays at:

https://brainly.com/question/22364342


Related Questions

FILL IN THE BLANK. Many hardware and software companies offer _____ for IT professionals, which verifies that an individual demonstrated a certain level of knowledge and skill on a standardized test.

Answers

For IT workers, many computer and software firms offer certification, which attests to the fact that a person met particular knowledge and skill requirements on a test of that kind.

A software is what?

Software is a set of commands, data, or programs used to operate computers and perform certain tasks. Software's opposite is hardware, which represents a computer's exterior parts. "Software" refers to all computer programs, scripts, and other items that run on hardware.

Why do we use software?

Software not only enables your computer hardware to carry out crucial functions, but it may also improve the productivity of your company. Even new methods of working can emerge from the correct software. As a result, it is a vital company asset, and you should select your software carefully to ensure that it meets your demands.

To know more about software visit:

https://brainly.com/question/25534931

#SPJ4

2. What is MOST TRUE of a mature technology?

Answers

Answer:

A mature technology is a technology that has been in use for long enough that most of its initial faults and inherent problems have been removed or reduced by further development.

Explanation:

Briefly embellish the virtues of structured Programming approach.

Answers

Answer:

Structured programming encourages dividing an application program into a hierarchy of modules or autonomous elements, which may, in turn, contain other such elements. Within each element, code may be further structured using blocks of related logic designed to improve readability and maintainability.

Explanation:

[SPECIAL]>>>WRITE THIS TEXT IN BINARY CODE

[SPECIAL]>>>WRITE THIS TEXT IN BINARY CODE

Answers

Answer: GET YOUR BONUS

in binary code

01000111 01000101 01010100 00100000 01011001 01001111 01010101 01010010 00100000 01000010 01001111 01001110 01010101 01010011

THX:

01010100 01001000 01000001 01001110 01001011 00100000 01011001 01001111 01010101

Answer:

01000111 01000101 01010100 00100000 01011001 01001111 01010101 01010010 00100000 01000010 01001111 01001110 01010101 0101001

Social media is a powerful tool for marketing, but when companies make mistakes, the backlash is immediate and often quite harsh. Why is this aspect more intense online?

A.
People can act immediately, and communication is bit unfiltered.

B.
No one noticed corporate missteps in the era before social media.

C.
In previous eras, marketing was carefully evaluated before released to the public.

D.
The public expects perfection from companies, but it was more forgiving in the past.

Answers

The backlash is immediate and often quite harsh because People can act immediately, and communication is a bit unfiltered. Thus the correct option is A.

What is Communication?

Communication is referred to the exchange of information between two individuals in the form of conversation, opinion, suggestion, or advice with the help of medium or direct interaction.

Social media is used for interaction and observed mass participation so feedbacks are quick therefore when companies make mistakes the backlash is immediate due to the immediate response of the viewer.

Hence, option A is appropriate.

Learn more about social media, here:

https://brainly.com/question/24687421

#SPJ1

According to the President at Kansas State University, what does a student need
to succeed in college?

Answers

According to the President at Kansas State University, a student needs focus and discipline to to succeed in college.

Why is this so?

When a person gets in to college, there are a million and one things that can distract them. However the primary goal should be to create good network and excel academically.

Unfortunately, this is not the case as many side activities often distract students and they only realize this when they are in their finals.

So it is correct to state that  a student needs focus and discipline to to succeed in college. As a student, you deicide how you'd lke to graduate and work at it every single day.

Learn more about discipline:
https://brainly.com/question/27915991
#SPJ1

Which of the following statements demonstrates the consequence of segregated medical
care?
A. Inequitable access to education and funding for Black doctors
B. Fewer predominately white medical schools being open to Black students
C. Both A and B
D. Neither A nor B

Answers

Answer:

C. Both A and B

Explanation:

Not only is inequitable access to education and funding for Black doctors a consequence of segregated medical care, it also resulted in less predominately white medical schools allowing Black students.

The statements that demonstrate the consequence of segregated medical care are both statements A and B. The correct option is C.

What is segregated medical care?

To distinguish or put apart from others or the general population. Segregated medical care has led to Black students being accepted into less primarily white medical institutions, which has resulted in unequal access to education and funding for Black professionals.

Black doctors have unequal access to education and funding. Less predominantly white medical colleges accept students of color.

Medical discrimination, racialized socioeconomic deprivation, and a segregated healthcare system all contribute to drastically different experiences in care for Black and White patients.

Therefore, the correct option is C. Both A and B.

To learn more about segregated medical care, refer to the link:

https://brainly.com/question/10812745

#SPJ6

Write code in MinutesToHours that assigns totalHours with totalMins divided by 60

Given the following code:

Function MinutesToHours(float totalMins) returns float totalHours
totalHours = MinutesToHours(totalMins / 60)
// Calculate totalHours:
totalHours = 0

Function Main() returns nothing
float userMins
float totalHours

userMins = Get next input
totalHours = MinutesToHours(userMins)

Put userMins to output
Put " minutes are " to output
Put totalHours to output
Put " hours." to output

Answers

Answer:

Function MinutesToHours(float totalMins) returns float totalHours

   // Calculate totalHours:

   totalHours = totalMins / 60

   return totalHours

End Function

A client has the right to receive ethically conducted research. Discuss this statement with examples.

Answers

A client has the right to receive ethically conducted research. This means that the researcher should adhere to the principles of scientific research, which includes honesty, objectivity, integrity, and respect for human subjects. In addition, the researcher should ensure that the research is conducted in a safe and responsible manner.

What is research?
Research is defined as "creative and methodical activity done to improve the body of knowledge." It entails the objective gathering, organising, and analysis of data in order to improve comprehension of a subject or issue. A research effort could build on prior contributions to the field. Research may duplicate portions of earlier projects or the project as a complete to verify the accuracy of instruments, processes, or experiments.

Documentation, discovery, interpretation, as well as the research and development (R&D) of methods & systems again for advancement of human knowledge are the main goals of basic research (as opposed to applied research). Research methodologies are based on epistemologies, which differ greatly within and between the humanities and sciences.

To learn more about research
https://brainly.com/question/25257437
#SPJ13

Write a program that will add the content of two counters every 45 seconds and place the result in an integer register.

Answers

Answer:

Explanation:

The following code is written in Java and runs a thread every 45 seconds that adds the two counters together and saves them in an integer variable called register. Then prints the variable. If this code runs 5 times it automatically breaks the loop. This can be changed or removed by removing the breakLoopCounter variable.

 public static void add_Counters(int counterOne, int counterTwo) {

       int register = 0;

       int breakLoopCounter = 0;

       try {

           while (true) {

               register += counterOne + counterTwo;

               System.out.println(register);

               Thread.sleep(45000);

               breakLoopCounter += 1;

               if (breakLoopCounter == 5) {

                   break;

               }

           }

       } catch (InterruptedException e) {

           e.printStackTrace();

       }

   }

Select the correct locations on the image. Adrian wants to delve into database administration. Which certifications would help him along this career path? PMP Oracle DBA PRINCE2 CSPM MCITP
you can pick multiple

Answers

Answer:

Oracle DBA and MCITP

25 Points !! HELP ASAP . DUE TOMORROW MORNING .

Imagine you are scrolling through your social media and you see these two links, which one would you click on? Why? Explain answer 2-3 sentences long .

25 Points !! HELP ASAP . DUE TOMORROW MORNING . Imagine you are scrolling through your social media and

Answers

Answer:

The Associated Press

Explanation:

Out of the two options presented, The Associated Press caught my attention more due to its compelling content. The content displayed is visually appealing and likely to pique one's curiosity, motivating one to seek further information.

Match the code to the image that it will produce

Answers

there is no image to look at it

how do i change my desktop theme on my chromebook?

Answers

Answer:

open Chrome.

At the top right, click More. Settings.

Under "Appearance," click Themes. You can also go to the gallery by visiting Chrome Web Store Themes.

Click the thumbnails to preview different themes.

When you find a theme you'd like to use, click Add to Chrome.

Explanation:

Which are examples of normative goals

Answers

Answer:

Goal-based decision making is goal generation together with goal-based planning

This decomposition of decision making in goal generation and planning raises several

questions, such as:

– How to represent beliefs? How to represent obligations? In this paper we represent

beliefs and obligations by rules, following the dominant tradition in deontic logic

(see e.g. [26,27]).

– How to develop a normative decision theory based on belief and obligation rules?

In this paper we introduce a qualitative decision theory, based on belief (B) and

obligation (O) rules.

You’re a project manager of a small team looking to hire. You have received many resumes to review, and while most of them look well qualified, two of the resumes are very poorly formatted and use wacky fonts and graphics. Would you consider these individuals as qualified candidates and be willing to interview them? Please justify your answer by briefly summarizing the discussion you might have with these candidates. Consider the following prompts as you develop your post: Explain why professional formatting matters on a resume or explain why it doesn’t. Argue whether we can infer anything about a candidate’s ability to work in a professional environment based on his or her resume’s formatting. Compare how you would address a resume with wacky fonts to how you would respond to grammatical errors in a resume.

Answers

No, you never consider those resumes that use wacky fonts and graphics. This is because it is the primary criterion that candidates have to fulfill in the hiring process.

What is the responsibility of a project manager?

Project managers are responsible for planning, organizing, and directing the completion of specific projects for an organization while ensuring these projects are on time, on budget, and within scope.

Professional formatting justifies the capabilities and strength of candidates with respect to their qualifications. It increases your chances for the hiring process with the selection of your resumes.

A candidate’s ability to work in a professional environment based on his or her resume’s formatting is significantly based on their curiosity and willingness to do work in the same culture.

To learn more about Professional formatting, refer to the link:

https://brainly.com/question/17971683

#SPJ1

Create a Java program that asks the user for three test
scores. The program should display the average of the
test scores, and the letter grade (A, B, C, D or F) that
corresponds to the numerical average. (use dialog boxes
for input/output)

Answers

Answer:

there aren't many points so it's not really worth it but here

kotlin

Copy code

import javax.swing.JOptionPane;

public class TestScoreGrader {

 public static void main(String[] args) {

   double score1, score2, score3, average;

   String input, output;

   input = JOptionPane.showInputDialog("Enter score 1: ");

   score1 = Double.parseDouble(input);

   input = JOptionPane.showInputDialog("Enter score 2: ");

   score2 = Double.parseDouble(input);

   input = JOptionPane.showInputDialog("Enter score 3: ");

   score3 = Double.parseDouble(input);

   average = (score1 + score2 + score3) / 3;

   output = "The average is " + average + "\n";

   output += "The letter grade is " + getLetterGrade(average);

   JOptionPane.showMessageDialog(null, output);

 }

 public static char getLetterGrade(double average) {

   if (average >= 90) {

     return 'A';

   } else if (average >= 80) {

     return 'B';

   } else if (average >= 70) {

     return 'C';

   } else if (average >= 60) {

     return 'D';

   } else {

     return 'F';

   }

 }

}

Explanation:

consider the following hypothetical scenario for a system with a single core cpu: process 13 starts executing after process 37 is put to sleep by the system call sleep(5). process 22 starts executing after process 13 is put to sleep by the system call sleep(10).

Answers

A timer exception occurs and triggers the appropriate interrupt handler.

What is exception?

Exceptions are runtime errors that disrupt the normal flow of instructions in a programme.

The method in which an error occurs generates an exception object, which is then passed to the runtime system. This is referred to as throwing an exception. The object contains information about the error, such as its type and location.

An exception handler is the code that runs when an exception occurs. The runtime method searches the call stack for an appropriate method containing the code for handling the exception. After receiving the exception, the runtime system attempts to find an appropriate way to handle it.

Learn more about exception

https://brainly.com/question/29526741

#SPJ4

full meaning of ENDVAC

Answers

Answer:

EDVAC was one of the earliest electronic computers. Unlike its predecessor the ENIAC, it was binary rather than decimal, and was designed to be a stored-program computer. ENIAC inventors John Mauchly and J. Presper Eckert proposed the EDVAC's construction in August 1944.

Explanation:

Here is the full meaning

who here plays overwatch or paladins ps4? I'm getting overwatch soon and need people to play with. please don't report this.​

Answers

Answer:

I'm down to play

Explanation:

distinguish between authentication and authorisation

Answers

Answer: Authentication is the process of verifying the identity of a user or entity, while authorisation is the process of determining if a user or entity has permission to access a particular resource or perform a certain action.

Explanation:

Integers limeWeight1, limeWeight2, and numKids are read from input. Declare a floating-point variable avgWeight. Compute the average weight of limes each kid receives using floating-point division and assign the result to avgWeight.

Ex: If the input is 300 270 10, then the output is:

57.00

how do I code this in c++?

Answers

Answer:

Explanation:

Here's the C++ code to solve the problem:

#include <iostream>

using namespace std;

int main() {

  int limeWeight1, limeWeight2, numKids;

  float avgWeight;

 

  cin >> limeWeight1 >> limeWeight2 >> numKids;

 

  avgWeight = (float)(limeWeight1 + limeWeight2) / numKids;

 

  cout.precision(2); // Set precision to 2 decimal places

  cout << fixed << avgWeight << endl; // Output average weight with 2 decimal places

 

  return 0;

}

In this program, we first declare three integer variables limeWeight1, limeWeight2, and numKids to hold the input values. We also declare a floating-point variable avgWeight to hold the computed average weight.

We then read in the input values using cin. Next, we compute the average weight by adding limeWeight1 and limeWeight2 and dividing the sum by numKids. Note that we cast the sum to float before dividing to ensure that we get a floating-point result.

Finally, we use cout to output the avgWeight variable with 2 decimal places. We use the precision() and fixed functions to achieve this.

Final answer:

The student can code the calculation of the average weight of limes that each kid receives in C++ by declaring integer and double variables, getting input for these variables, and then using floating-point division to compute the average. The result is then assigned to the double variable which is displayed with a precision of two decimal places.

Explanation:

To calculate the average weight of limes each kid receives in C++, declare three integers: limeWeight1, limeWeight2, and numKids. Receive these values from input. Then declare a floating-point variable avgWeight. Use floating-point division (/) to compute the average weight as the sum of limeWeight1 and limeWeight2 divided by the number of kids (numKids). Assign this result to your floating-point variable (avgWeight). Below is an illustrative example:

#include

  cin >> limeWeight1 >> limeWeight2 >> numKids;

}

Learn more about C++ Programming here:

https://brainly.com/question/33453996

#SPJ2

Martina wants to increase her strength in her lower and upper body to help her in her new waitressing job. Right now, Martina lifts weights once a week and includes exercises that work out all muscle groups. Which change in her workout would be BEST to help her meet her goals? A. making sure that she targets the groups in the upper body and works these groups out every day B. concentrating on the muscle groups that will strengthen only her arms and legs for her job and doing this workout every day C. working out her arms on Monday, her legs on Wednesday, and her stomach on Friday. D. making sure there is variety, at least 48 hours of rest for specific muscle groups, and that each target group gets a workout three times a week Please select the best answer from the choices provided. A B C D

Answers

Answer:

D. making sure there is variety, at least 48 hours of rest for specific muscle groups, and that each target group gets a workout three times a week

Explanation:

Making sure there is variety, at least 48 hours of rest for specific muscle groups, and that each target group gets a workout three times a week. Thus, option D is correct.

What are the important points that should be remembered for weight gain?

Making sure there is variety, at least 48 hours of rest for specific muscle groups, and that each target group gets a workout three times a week would help her achieve her goals. Martina decided to workout because of her new job of waitressing.

She doesn't need an extensive and vigorous exercise. She only needs tofocus on on exercises which build the muscles of legs and hands which are majorly used in the job.Variation in exercise ,having enough rest and increasing the workout days from once a week to thrice a week will help her achieve her goals without breaking down or falling ill.

Therefore, Thus, option D is correct.

Read more about Workout on:

brainly.com/question/21683650

#SPJ5

.... is a way to engage people at different locations in synchronous interaction ( fill in the blank space)​

Answers

Answer:

Video Teleconferencing (VTC).

Explanation:

Communication can be defined as a process which typically involves the transfer of information from one person (sender) to another (recipient), through the use of semiotics, symbols and signs that are mutually understood by both parties.

Video Teleconferencing (VTC) is a way to engage people at different locations in synchronous interaction.

In the space below, explain how the Table Tools can be accessed

Answers

Answer:

Click in the cell (or select multiple cells) that contains text you want to align. The Table Tools tab appears. Click the Layout tab under the Table Tools heading. … If you change the alignment of blank cells, any new text you type in those blank cells will appear according to the alignment you choose.

Explanation:

Answer:

Creating a Table

1) Click the Insert tab on the Ribbon

2) Click on Table

3) Highlight the number of columns and rows you’d like

OR

4) Click Insert Table

5) Click the arrows to select the desired number of columns

6) Click the arrows to select the desired number of rows

7) Click OK

Explanation:

Which of the following statements are true about how technology has changed work? Select 3 options. Responses Businesses can be more profitable by using communication technology to reduce the costs of travel. Businesses can be more profitable by using communication technology to reduce the costs of travel. With the spread of technology and the Internet, smaller businesses are not able to compete as effectively as before. With the spread of technology and the Internet, smaller businesses are not able to compete as effectively as before. In a gig economy, workers are only hired when they are needed for as long as they are needed. In a gig economy, workers are only hired when they are needed for as long as they are needed. Through the use of the Internet and collaboration tools more workers are able to perform their jobs remotely. Through the use of the Internet and collaboration tools more workers are able to perform their jobs remotely. Technology has not really changed how businesses operate in the last fifty years. Technology has not really changed how businesses operate in the last fifty years.

Answers

The three genuine statements almost how technology has changed work are:

Businesses can be more productive by utilizing communication technology to decrease the costs of travel. This can be genuine since advances like video conferencing and virtual gatherings permit businesses to conduct gatherings, transactions, and collaborations remotely, lessening the require for costly travel courses of action.

With the spread of technology and the Web, littler businesses are not able to compete as successfully as some time recently. This explanation is genuine since innovation has empowered bigger companies to use their assets and reach a worldwide advertise more effortlessly, making it challenging for littler businesses to compete on the same scale.

Through the utilize of the Web and collaboration devices, more laborers are able to perform their occupations remotely. This explanation is genuine as innovation has encouraged farther work courses of action, allowing employees to work from anyplace with an online association. Collaboration instruments like extend administration computer program and communication stages have made inaccessible work more doable and effective.

Technology explained.

Technology alludes to the application of logical information, aptitudes, and devices to form innovations, fathom issues, and move forward proficiency in different spaces of human movement. It includes the improvement, usage, and utilize of gadgets, frameworks, and processes that are outlined to achieve particular assignments or fulfill specific needs.

Technology can be broadly categorized into distinctive sorts, such as data technology, communication technology, therapeutic innovation, mechanical technology, and transportation technology, among others. These categories include different areas, counting computer science, hardware, broadcast communications, building, and biotechnology.

Learn more about technology below.

https://brainly.com/question/13044551

#SPJ1

Upload your completed chart using the information you gained in your interviews.

Answers

Answer:

1.) X-ray Technician

Lead Apron & X-ray Machine

X-ray machine is used to make an image of a person’s bones, and the lead apron is used to block the radiation.

2.) Shipyard Project Manager

Hardhat & Gas Monitors

Gas monitors are used to detect gas leaks; while the hardhats are used to protect from falling objects.

3.) Teacher

Computers & Promethean Boards

Computers are used to project the assignments onto the Promethean boards.

Explanation:

Make me the brainliest!!! Thanks!!!

WHICH OF THESE COMMANDS ALLOWS YOU TO NAVIGATE TO THE OUTLINE FILE THAT WILL BE INTEGRATED INTO A PRESENTATION?

Answers

The question seems to be asking about commands that allow you to navigate to an outline file for integration into a presentation.

How to go about this?

However, without specific information about the software or tools being used, it is difficult to provide a specific command.

Generally, in presentation software like Microsoft PowerPoint, you can navigate to an outline file by going to the "File" menu, selecting "Open," and choosing the appropriate file.

Other presentation tools may have similar options to navigate to and open an outline file.

Learn more about command at:

https://brainly.com/question/25808182

#SPJ1

Discuss one of the privacy torts in detail.

Answers

Privacy torts are a category of legal claims that seek to provide redress for violations of an individual's right to privacy. this response, I will discuss the public disclosure of private facts tort.

What is public disclosure?

Public disclosure of private facts is a legal claim that arises when a person publicizes private information about another individual that is highly offensive and not of legitimate concern to the public.

The disclosure of such information must be made in a way that is highly offensive to a reasonable person, and it must be made to a large number of people or to a specific individual who is likely to publicize the information further.

Learn more about privacy on

https://brainly.com/question/27034337

#SPJ1

why is creating a program important to society?​

Answers

When creating a program it is important because you can organize an institution with this program or help an organization whether it is financial or not.

In that way we can say that Social protection programs guarantee access to food – often expanding what the families themselves already produce – with greater diversity and healthier food. These programs can have positive impacts on maternal and child nutrition, the reduction of child labor and access to education.

See more about program at brainly.com/question/11288081

Other Questions
Can somebody help me with these problems please Evaluate the integral. /4 8 + 7 cos2 / cos2 d 0 To rent a taxi in Los Angeles, the taxi service charges a flat rate of $16.40 and an additional $4.90 per mile driven. In this situation, what is the value of the slope? What is a segment of DNA that codes for a specific trait The diagram shows one period of the Periodic Table. Li ,Be ,B , C,N,O,F,Ne .Which two elements form acidic oxides? A -carbon and lithium B -carbon and neon C- carbon and nitrogen D-nitrogen and neon a client comes to the clinic asking what erythropoiesis means. the nurse would state that erythropoiesis is the process of making: The nurse is admitting Eva, a 5 year old with severe gastroenteritis and dehydration, to the hospital. Which of the following nursing interventions has highest priority?a. assessing Eva's heart rate, skin turgor, and last urine outputb. orienting Eva's family to the unit location of restrooms, call light, TV Etc.c. Obtaining a detailed family medical history from Eva's motherd. Making sure that Eva has changed into a hospital gown A computer user has downloaded 19 songs using an online file-sharing program and wants to create a CD-Rwith 9 songs to use in his portable CD player. If the order that the songs are placed on the CD-R is notimportant to him, how many different CD-Rs could he make from the 19 songs available to him?There arepossible CD-R's. what is the most difficult side effect of propanolol for PTSD? please help 20 points will give crown only 2 answers a hydrocarbon produced 0.010 mol of c and 0.0150 mol of h during combustion. what is the empirical formula of the hydrocarbon? $$ The current level of a broad stock market index is 1,299. Its dividend yield is 4% and the standard deviation of index returns is 20%.An American call option on the stock expires in 0.8 years. Its strike price is $1,300. The risk-free rate is 5% (annual, continuously compounded).Value the option using a binomial model with 2 periods of length 0.4 years each.1. What is the value of the option in 0.4 years if the stock price has gone down once?2. What is the current value of the option? the symptoms of ________ include dermatitis, dementia, diarrhea, and death. Two parallel lines, p and q, are cut by the transversal k as shown.Suppose mZ2=125.p29Complete the statements below.We see that If the price of gasoline were to go up while there was no charge in the demand for gasoline, what would happen to consumers' surplus?A) producer surplus would go upB) consumer surplus would go downC) consumer surplus would stay the same A certain first-order reaction has a rate constant of 2.10102 s1 at 19 C. What is the value of k at 58 C if Ea = 82.0 kJ/mol ? This season, the probability that the Yankees will win a game is 0.5 and the probability that the Yankees will score 5 or more runs in a game is 0.54. The probability that the Yankees win and score 5 or more runs is 0.43. What is the probability that the Yankees would score 5 or more runs when they win the game? Round your answer to the nearest thousandth a jogger runs along a straight and level road for a distance of 8.0 km and then runs back to her starting point. the time for this roundtrip is 2.0 h. which one of the following is true and why? HELPPPP OML MY MATH IS SO HARD 8th GRADE MATH MAN ( 35 ) 2 = The mere exposure effect _____.A.happens when familiar things are selectively ignoredB.causes people to dislike things they are familiar withC.can cause people to reject unfamiliar thingsD.is a bias against familiar things