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
Respected Sir, I want the above written text in a C program

derivations 1. Regardless of the type of derivation, private members are inherited by the derived class, but cannot be accessed by the new member function of the derived class,

What is Namespace and Explicit container Namespace - Namespaces are used to group entities such as objects, classes and functions under a name. Explicit container.

Damjibhai and Shamjibhai are two jeweler friends. They decide to play a simple game. The game comprises of removing the jewels for polishing, turn by turn. Once a jewel is removed

C CODE FOR PEBBLE MERCHANTS PROBLEM

Define some Important Point for bit fields with structures? Only n lower bits will be assigned to an n bit number thus type cannot take values larger than 15 (4 bits long)

Introduction to C++ C++ was developed by Bjarne Stroustrup at Bell Laboratories in 1983. Originally, it was known as " C with class". C+ as an enhancement to the C language was

Ask question #write statement that assign random integer to the varaible n in the (100

Q: How can Define an Array? An Array is defined in much the alike manner as ordinary variables except that every array name must be accompanied by a size specification (that is