Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Systems For Advanced Applications Dasfaa 2023 International Workshops Bdms 2023 Bdqm 2023 Gdma 2023 Bundlers 2023 Tianjin China April 17 20 2023 Proceedings Lncs 13922

Authors: Amr El Abbadi ,Gillian Dobbie ,Zhiyong Feng ,Lu Chen ,Xiaohui Tao ,Yingxia Shao ,Hongzhi Yin

1st Edition

3031354141, 978-3031354144

More Books

Students also viewed these Databases questions

Question

Discuss five types of employee training.

Answered: 1 week ago

Question

Identify the four federally mandated employee benefits.

Answered: 1 week ago