Example of array, C/C++ Programming

In this lab, please complete a given program to perform the following tasks:

1. Allocate a 10 by 5 2D byte array dynamically. The way of allocation must be consistent with page 39 in chap9.ppt. Each element is a byte.

2. For each element in the array, assign a random number. The range does not matter.

3. Display the array.

4. Exchange the rows as defined below:

Row 0 becomes Row 9

Row 1 becomes Row 0

Row 2 becomes Row 1

Row 3 becomes Row 2

Row 4 becomes Row 3

Row 5 becomes Row 4

Row 6 becomes Row 5

Row 7 becomes Row 6

Row 8 becomes Row 7

Row 9 becomes Row 8

Please swap the values, instead of just the pointers.

5. Display the array.

You are required to finish the given program, "TwoDArray_lab6.asm", without adding new variables. The output may look like:

1823_output.png

Posted Date: 3/14/2013 5:58:00 AM | Location : United States







Related Discussions:- Example of array, Assignment Help, Ask Question on Example of array, Get Answer, Expert's Help, Example of array Discussions

Write discussion on Example of array
Your posts are moderated
Related Questions
Write a program to find the area under the curve y = f(x) between x = a and x = b, integrate y = f(x) between the limits of a and b.

Run the following C++ program with and without preprocessor variable POSTFIX defined. #include using namespace std; extern "C" int atoi( const char *str );

C Program for STRING ADDRESS #include stdio.h> #include conio.h> #include string.h> void main() {           char *name;           int length;           cha

We are seeking a talented developer/team with great experience in programming apps for both Android and iOS. Our project needs great skills and experience in making good functional

It is a class defined in the scope of a function _ any function, whether a member functions or a free function. For instance: // Example : Local class // int f() { c

#C Why don''t online compilers support the header file? What can I do to resolve this? PS. I have tried , does''nt work either. Thannk in advance.

Employ operator () instead of operator[]. While you have multiple subscripts, the cleanest way to do it is along with operator () instead of with operator[]. The reason is that

I need to include files so you can understand easier.

I need vsti program Project Description: Knowledge of vsti programs, and music is a plus, ex: nexus I will input the sounds I just need the interface built Skills required

How can one make it so keys pressed through users are not echoed on the screen? A: It is not a standard C++ feature. C++ doesn't even need your system to have a keyboard or a sc