Question: - Write your name, Id. - Due date: 18 - Feb-2023 (midnight). 1. What are the advantages of using a function in a program? 2.

 - Write your name, Id. - Due date: 18 - Feb-2023

- Write your name, Id. - Due date: 18 - Feb-2023 (midnight). 1. What are the advantages of using a function in a program? 2. Explain the following concepts with respect to functions. a) Function prototype. b) Function definition. c) Function call. d) Local variables. 3. List the types of user-defined functions. 4. Write a complete C program using array with function. As such, the function, findLetter, that receives a string, str, and a character, ch, as arguments and returns the position of the first occurrence of ch in str or -1 if ch doesn't exist in str. Use the proposed names for the arguments. Demonstrate the use of your function by calling it from a main function. After calling your function, findLetter, print the character entered by the user and its position within the string. If the character is not found within the string, then print the character is not found. Sample eutput a1: please provide youf ateingp Sadiq please provide your characters 1. four character is pobitien in 3 Sample eulpuit in2: prease proviche your sturiag? Sadrc Please provide your characters u fouf charaeter o in not found within the atting

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!