Question: Using C Programming Code solve these problems Problem 1 3 Write a program asking the user to keep entering in strings ( ie names )

Using C Programming Code solve these problems
Problem 13
Write a program asking the user to keep entering in strings (ie names) until they enter the string leave, at which point youll exit the loop and tell them how many times they entered the string gold. This one requires that you use a loop and also keep a tally of the number of times they enter the string gold.
Problem 14
Implement a function called zeros_and_ones() that takes an array s as argument and returns the number of zeros and ones in the array
s =[1,0,1,0,0,1,0,0,1,0,0,1,1,1,1,0,0,0,1,0,1,1,1,1,1]
Hint:
Your program should output {0: 11,1: 14}
Problem 15
Write a function min_max() that takes an array as an argument, and print the minimum and maximum values along with their ranks, ie, their
positions (starting at 1) in the input.
Example: my_list =[3,1,5,4,2] The minimum value is 1 and the rank is 2 in the list The maximum value is 5 and the rank is 3 in.
the list
Lets say your array has 3,1,5,4,2
Hint: your output should look like this
min is 1 rank is 2
max is 5 rank is 3
Note that when sending an array as a parameter its also ok to send its size as a second parameter so c does not get confused not knowing how big it is, for example, visual studio might complain if you dont send the size.
Problem 16
Make two pointers to integers p1 and p2
Make two integers x and y
Set x to 10
Set y to 20
Have p1 point to x
Have p2 point to x
Print the value p1 points to ie *p1 should print 10
Print the value p2 points to ie *p2 should be 10
Have p1 point to y now
Have p2 point to x now
Print the value p1 points to ie *p1 should print 20
Print the value p2 points to ie *p2 should be 10

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!