Program for dynamic 2d memory, C/C++ Programming

Requirements:

1.  This assignment as well as other assignments in this class must be finished on Windows operating system.

2.  Zip your program and submit the zip file on ANGEL

Assignments:

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

1.  Allocate a 10 by 5 2D byte array dynamically. 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:1409_dynamic 2D memory.png

2041_dynamic 2D memory.png

Posted Date: 3/5/2013 6:54:33 AM | Location : United States







Related Discussions:- Program for dynamic 2d memory, Assignment Help, Ask Question on Program for dynamic 2d memory, Get Answer, Expert's Help, Program for dynamic 2d memory Discussions

Write discussion on Program for dynamic 2d memory
Your posts are moderated
Related Questions
What are the various types of control structures in programming? - Primarily there are 3 types of control structures in programming: Sequence, Selection and Repetition. - Se

Problem : Change to palindrome A palindrome is a string that reads the same from both the ends. Given a string S convert it to a palindrome by doing character replacement. Your ta

#questThere is a pebble merchant. He sells the pebbles, that are used for shining the floor. His main duty is to take the length of the room’s sides. But he sometimes mistakes doin

basic salary of an employe.the allowence are House rent 20% of basic salary Medical allowence is 10% of basic salary conveyence allowence is 10% calculate anrd display gross salar

Variable Declaration This declaration of variables in the C language is permitted only in the starting of their block, prior to executable program statements. In C++ declaratio

Destructor: The purpose of destructor is to free the memory when the compiler memory is reduced or not enough to execute certain program. Sometimes there may several objects op

Solve the Nine Queens problem recursively. The objective is to place nine queens on an empty chessboard so that no queen is “attacking” any other, i.e., no two queens are in the sa

enter height of the shape: 1 3 5 3 1 3 5 7 5 3 5 7 9 7 5 3 5 7 5 3 1 3 5 3 1

Smugglers are becoming very smart day by day. Now they have developed a new technique of sending their messages from one smuggler to another. In their new technology, they are send

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