Question

Which of the following is critical to remember when setting up your array? a. columns used...

Which of the following is critical to remember when setting up your array?

a.

columns used for running totals need to be initialized at the value of zero

b.

use integer datatypes to store numbers

c.

columns that are dimensions should be initialized to the value of NULL.

d.

its best to limit the number of columns per array to 1/3 of the number of rows

Homework Answers

Answer #1

SOLUTION:

columns that are dimensions should be initialized to the value of NULL.

Reason:

There are possibilities to leave the size of a 1-D Array size as blank

But that is not possible in 2-D array. We should make array column size as NULL:

/* the Valid declaration*/
int array[2][2] = {1, 2, 3 }  
/* this is also Valid declaration*/ 
int array[][2] = {1, 2, 3 }  
/* this is not Invalid declaration – you must specify second dimension*/
int array[][] = {1, 2, 3 }   
/* Invalid because of the same reason  mentioned above*/
int array[2][] = {1, 2, 3 ,4, 5}
Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
Write the following program in MIPS: a) declare an array A of the following numbers: 3,...
Write the following program in MIPS: a) declare an array A of the following numbers: 3, 5, 8, 10, 12, 2, 76, 43, 90, 44 b) declare a variable called size which stores the number of element in array A, that is 10. c) write a subroutine to search for a number stored in an array and return true or false. In C++ the subroutine is as follows: search(array, size, number_To_Search) e.g. search(A, 10, 12) The subroutine should return 0...
How to use C++ figure this question? Collection and Sorted Collection An array is great for...
How to use C++ figure this question? Collection and Sorted Collection An array is great for storing a list of values. However, one challenge when working with arrays is they have a fixed size. If you declare an array of size 10 and later need to actually store 11 elements you have to create a new array and copy everything over. C++ (and other langauges) create classes that handle this and other operations behind the scenes. In this assignment, we...
Problem Definition: Problem: Given an array of integers find all pairs of integers, a and b,...
Problem Definition: Problem: Given an array of integers find all pairs of integers, a and b, where a – b is equal to a given number. For example, consider the following array and suppose we want to find all pairs of integers a and b where a – b = 3 A = [10, 4, 6, 16, 1, 6, 12, 13] Then your method should return the following pairs: 4, 1 15, 12 13, 10 A poor solution: There are...
Be Nice to Pigeons, As They Remember Your Face In a study1 conducted in Paris, France,...
Be Nice to Pigeons, As They Remember Your Face In a study1 conducted in Paris, France, equal amounts of pigeon feed were spread on the ground in two adjacent locations. A person was present in both sites, with one acting hostile and running at the birds to scare them away and the other acting neutral and just observing. The two people were randomly exchanged between the two sites throughout and the birds quickly learned to avoid the hostile person’s site...
Procedure I. Reverse Transcription. For each of your RNA samples set up the following reaction: *Remember...
Procedure I. Reverse Transcription. For each of your RNA samples set up the following reaction: *Remember to use proper RNA handling technique! 1. In a 0.2 ml size RNAse-Free tube add the following: • 0.5 µg RNA (no more than 6 µl) You can add as little as 0.1 µg of RNA if your concentration is low • 2 µl dT primer • Nuclease Free Water to final volume of 8 µl * Before you start write the exact volume...
Instructions: In 1974, Loftus and Palmer conducted a classic study demonstrating how the language used to...
Instructions: In 1974, Loftus and Palmer conducted a classic study demonstrating how the language used to ask a question can influence eyewitness memory. In the study, college students watched a film of an automobile accident and then were asked questions about what they saw. One group was asked, “About how fast were the cars going when they smashed into each other?” Another group was asked the same question except the verb was changed to “hit” instead of “smashed into.” The...
AP Computer Science A FRQ SHOW ALL YOUR WORK. REMEMBER THAT PROGRAM SEGMENTS ARE TO BE...
AP Computer Science A FRQ SHOW ALL YOUR WORK. REMEMBER THAT PROGRAM SEGMENTS ARE TO BE WRITTEN IN JAVA. Assume that the classes listed in the Java Quick Reference have been imported where appropriate. Unless otherwise noted in the question, assume that parameters in method calls are not null and that methods are called only when their preconditions are satisfied. In writing solutions for each question, you may use any of the accessible methods that are listed in classes defined...
Instructions: For this discussion, everyone in a prior class told me how many siblings they have....
Instructions: For this discussion, everyone in a prior class told me how many siblings they have. That data is in the chart (below). For example, if someone had three siblings, then they put an X in the row for Three Siblings. First, determine the frequency of siblings. Then answer the questions that follow/ Number of Siblings Running Tally of Number of Siblings (Brothers and Sisters) (Put a x each time the category applies) Frequency Zero (no) siblings xxxxxxxxxxx 11 One...
A comprehensive employee appraisal is often made up of several different methods of performance evaluation. You...
A comprehensive employee appraisal is often made up of several different methods of performance evaluation. You can choose to use just one evaluation process when judging an employee's performance, but when you use multiple evaluation methods you are able to get a broader picture of the areas where the employee needs improvement and what recommendations you should make to support employee development. Self-Evaluation The self-evaluation is often effective when teamed up with a performance review. The employee is asked to...
1. When presenting data graphically, you can choose from many types of graphics. Different graphic types,...
1. When presenting data graphically, you can choose from many types of graphics. Different graphic types, such as tables and charts, can be used to effectively highlight and depict different types of data in your report or presentation. As a professional communicator, you need to know which type of graphic is appropriate for different data. What type of graphic best illustrates changes in quantities over time? -Table -Line graph -Flow chart Read the scenario, and then answer the question. Sandeep...
ADVERTISEMENT
Need Online Homework Help?

Get Answers For Free
Most questions answered within 1 hours.

Ask a Question
ADVERTISEMENT