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
Programming Assignment # 1 C and UNIX   The purpose of this assignment is to get you more familiar with Unix/Linux and those constructs of C that are not part of C++. Write a C

Exceptions. Your SVector class should throw four exceptions: 3.1. If the constructor size is invalid, then it will just allow the implicit STL bad_alloc exception to pass up to mai

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

Purchasing Code Signing Certificate I want to purchase a Code Signing Certificate in good standing from someone in order to sign my .EXE programs with. Please be aware I do n

Ask4. Write a query to display the columns listed below. The query should list each customer in which the video rental is overdue. The Days_Overdue column should calculate the numb

6999066263304447777077766622337778 -----> message sent by the first smuggler. my name is robert---------> message decoded by the second smuggler. Where ‘0’ denotes the "space".

Question Write a program using c++ for the above function , at a= 1000, b=10 -3 ,10 -2 ,10 -4

A: Memory that has no pointer pointing to it and there is no method to delete or reuse this memory(object), it causes Memory leak. { Base *b = new base(); } Out of this

For your class to work properly, you'll need to define appropriate constructors, extract and insert operators, and of course arithmetic operators. (If you wanted to use it as a gen