Question: Exercise Objectives Declare, initialize, manipulate, and pass an array of integers. Problem Description Write a C program to calculate the summation of 7 numbers. Implement

Exercise Objectives
Declare, initialize, manipulate, and pass an array of integers.
Problem Description
Write a C program to calculate the summation of 7 numbers. Implement the program using the following steps:
Define a function void PrintWelcome 0 used to print the welcome statement.
Define a function int CalcSum (int a [], int size) that receives an integer array and its size as parameters, calculates the sum of the array, and returns the sum.
In main:
> Call function PrintWelcome() to print the welcome statement.
> Declare an integer array numbers[] with a size of 7 using #define and initialize it with zeros.
> Use a for loop to ask the user to input 7 numbers and store them in the numbers[] array.
> Call the CalcSum () function to calculate the sum of the numbers[] array.
> Display the calculated summation on the output.
Note: You must adhiere to the following sample.
Sample Output
Exercise 2
Exercise Objectives
Use a counter and while loop.
Problem Description
Create a c program that asks the user to enter his name using an array of characters:
Define a function void PrintWelcome 0 used to print the welcome statement.
Define a function int get_length(int a [], int size) that receives the array and its size and returns the length of the name to the main (using a while loop).
Define a function void Reverse_Name(int a[], int size) that receives the array and its size and prints the reverse name (using a while loop).
In main:
> Call function PrintWelcome() to print the welcome statement.
> Create an array of char with size 25 and initialize it to NULL
> Ask the user to input his name.
> Call function get_length .
> Call function Reverse_Name.
Sample OutputWrite a C program that performs the following steps:
Define a function void PrintWelcome() to print a welcome message to the user.
Define a function int max (int arr [], int size) that receives an array of integers and its size as input and returns the maximum value in the array.
Define a function int isPrime(int num) that receives an integer as input and returns 1 if the number is prime, and 0 otherwise.
In main:
> Call the PrintWelcome0 function to print the welcome message.
> Declare an integer array numbers with a size of 5 using #define and initialize it with zeros.
> Use a for loop to ask the user to input 5 numbers and store them in the numbers array.
> Call the max () function on the numbers array and print the maximum value.
> Use a for loop to check each number in the array using the isPrime0 function and print whether each number is prime or not.
Note: You must adhere to the following sample.
Sample Output
 Exercise Objectives Declare, initialize, manipulate, and pass an array of integers.

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!