Question: try to answer all Question 1: (5 marks) Write a program that takes in n integers between 1 and 100, and prints the most frequent

try to answer all try to answer all Question 1: (5 marks) Write a program that

Question 1: (5 marks) Write a program that takes in n integers between 1 and 100, and prints the most frequent integer. If there are more than one most frequent integers, the program may print any one of them, Sample input and output: How many numbers? 5 Enter: 2 Enter: 4 Enter: 6 Enter: 2 The most frequent number is 2 How many numbers? 6 Enter: 3 Enter: 5 Enter: 3 Enter: 2 Enter: 1 Enter: 2 The most frequent number is 2 How many numbers? 4 Enter: 6 Enter: 3 Enter: 5 Enter: 9 The most frequent number is 3 Question 2: (5 marks) Let Ispresent be a function that returns 1 if a given integer is present in a gi ven array of size 10. and otherwise. The prototype of Ispresent is as follows: int Ispresent(int Arrayll. int integer); Write a program that takes in 10 positive integers through the keyboard, stores them in an array, and then uses the function Ispresent to count the number of pe rfect squares amongst those integers. You may assume that all the elements enter ed are distinct (that is no two integers are the same). You must use the given p rototype definition of Ispresent function (and do not use your own definition). Sample input and output: Enter: 1 Enter: 2 Enter: 3 Enter: 5 Enter: 7 Enter: 4 Enter: 16 Enter: 25 Enter: 6 Enter: 81 5 Question-3: (5 marks) Write a C program that will read a key press and will print if it is an upper.ca se or lower case English letter A to Z and a to z) or digit or none. [Hints: ASCII value of 'e' is 48: 'A' is 65; 'a' is 971 Input: a Output: Character Input: 9 Output: Digit Input: & Output: None

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!