Question: in c language 1. Write a program which performs the following tasks: (a) Asks a user to input 8 digits {0,1,2, ...9} and stores them

in c language
1. Write a program which performs the following tasks: (a) Asks a user to input 8 digits {0,1,2, ...9} and stores them in a dy- namically allocated array of a name dig. If the user tries to input a number which is not a digit. the program should print a suitable message and retry reading the number. Assume that the user pro- vides only the integer numbers. (b) Allocates the memory for a dynamic array of size 8 and a name ran. Fills the array with random numbers from the set {0, 1.2....9} (c) Calculates two numbers using the digits stored in arrays dig and num in a following way array number 12.5.1.1.7.9.3.1) 25117931 Finds a number which is greater and prints it to the screen
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
