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
What is copy constructor? describe the concept of copy constructor.

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

write c program to do the following : -fill 2 dimensional array (square matrix array with size=4). -ask the user to enter any integer number and add this number to the diagonals -o

The Shift Operators There are 2 shift operators : left shift ( >). These are binary operators. The format is                 operand >> number or operand   The first

It is standard on functions to provide some indication that the function has succeeded in its operation. Consider the Scanf function:     scanf("%d",&number1);   If the functio

Pointer Arithmetic We can manipulate the pointers too. We can perform operations such as addition, subtraction, increment and decrement etc.,. As the pointer variables have add

Passing and Returning Objects Objects can be passed to a function and returned back just like normal variables. When an object is passed by content, the compiler makes another

In this worksheet you are asked to write three classes in C++: Lecture class, Course class and University class. The classes relate to each other in the way that a Course has many

submitting solutions in C language should not use functions from / as these files do not exist in gcc