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
payment system, in c++ only..just use the printf or scanf.please

program for factorial

To develop a web crawler such that when given a base URL, it will traverse the entire web tree and then build an index of keywords and what URL link they appear on.   The web crawl

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. The area under a curve between two points can b

We want Guys For Job in Gaming Tracks Company for a mobile game developing Project Description: I want a team of game developers for life-time as mobile dev team in my compan


what is the syntax to get a coloured output.

Define Polymorphism? A: Polymorphism let a client to treat di_erent objects in the simialr way even if they were developed from di_erent classes and exhibit di_erent behaviors.

What are  P r im a r y D a t a T y p es? Integer can be defined according to the size of the data and it can be modified further by using keyword unsigned and si

Relational Operators A relational operator is used to make comparison among two values. All these operators are binary and needs two operands. There are the following relationa