The world’s Largest Sharp Brain Virtual Experts Marketplace Just a click Away
Levels Tought:
University
| Teaching Since: | Apr 2017 |
| Last Sign in: | 438 Weeks Ago, 1 Day Ago |
| Questions Answered: | 9562 |
| Tutorials Posted: | 9559 |
bachelor in business administration
Polytechnic State University Sanluis
Jan-2006 - Nov-2010
CPA
Polytechnic State University
Jan-2012 - Nov-2016
Professor
Harvard Square Academy (HS2)
Mar-2012 - Present
(Two-Dimensional array Questions) Consider a 2-by-3 integer array t.
Â
a) Write a declaration for t.
b) How many rows does t have?
c) How many columns does t have?
d) How many elements does t have?
e) Write the names of all the elements in row 1 of t.
f) Write the names of all the elements in column 2 of t.
g) Write a statement that sets the element of t in the first row and second column to zero.
h) Write a series of statements that initialize each element of t to zero. Do not use a loop.
i) Write a nested counter-controlled for statement that initializes each element of t to zero.
j) Write a nested range-based for statement that initializes each element of t to zero.
k) Write a statement that inputs the values for the elements of t from the keyboard.
l) Write a series of statements that determine and display the smallest value in array t.
m) Write a statement that displays the elements in row 0 of t.
n) Write a statement that totals the elements in column 2 of t.
o) Write a series of statements that prints the array t in neat, tabular format. List the column subscripts as headings across the top and list the row subscripts at the left of each row.
Wri-----------te -----------a d-----------ecl-----------ara-----------tio-----------n f-----------or -----------t. -----------int----------- t[-----------2][-----------3];----------- Ho-----------w m-----------any----------- ro-----------ws -----------doe-----------s t----------- ha-----------ve?----------- 2 -----------How----------- ma-----------ny -----------col-----------umn-----------s d-----------oes----------- t -----------hav-----------e? -----------3 H-----------ow -----------man-----------y e-----------lem-----------ent-----------s d-----------oes----------- t -----------hav-----------e? -----------6 W-----------rit-----------e t-----------he -----------nam-----------es -----------of