Create a dynamic array of int that can store 20 numbers


Lab Assignment

1. Create a dynamic array of int that can store 20 numbers. Do the following:

a) Input 20 numbers to the array
b) Find the average of the array
c) Find and output the largest element and its index
d) Output the address of the array.
e) Re-allocate the array to the size of 40
f) Store 20 random numbers between 1 and 100 to the newly allocated 20 cells
g) Find and output the largest element and its index.
h) Output the address of the array.

2. Write a program using XOR with secret character of `&' to decipher the following encryption:

"rNC e vTIATGKKOHA @OHGJ C^GK QOJJ NGPC RNOTR KSJROVJC ENIOECU WSCUROIH, 10 EIBC TCGBOHA WSCUROIHU, GHB IHC VTIATGKKOHA WSCUROIH";

Solution Preview :

Prepared by a verified Expert
C/C++ Programming: Create a dynamic array of int that can store 20 numbers
Reference No:- TGS02304023

Now Priced at $30 (50% Discount)

Recommended (91%)

Rated (4.3/5)