Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

The question that you had posted are not compiling correctly. Homework 4 Your code must be written in C and compile with the gcc compiler

The question that you had posted are not compiling correctly.

Homework 4 Your code must be written in C and compile with the gcc compiler on replit. Use the alphabet for all parts of this homework is: " !.abcdefghijklmnopqrstuvwxyz" Question 1 Implement a linear search typing program. Repeatedly ask the user what letter they are thinking until you get the right one. Stop when the user types the exclamation point. Submit the code in the file main.c. You may supply additional files if you wish to. You main program must be in main.c. Assumption: You may assume that the user will only type: y, Y, n, or N. The user will only enter exactly 1 character and will not enter any other characters. You do not have to provide any error checking on this input. Remember we are simulating a person who can only give us yes/no answers. Assumption: You may assume the user will never type more than 100 characters before entering '!'. Example Execution Trace: Are you thinking of the letter ' '? n Are you thinking of the letter '!'? n Are you thinking of the letter '.'? n Are you thinking of the letter 'a'? n Are you thinking of the letter 'b'? n Are you thinking of the letter 'c'? y Are you thinking of the letter ' '? n Are you thinking of the letter '!'? n Are you thinking of the letter '.'? n Are you thinking of the letter 'a'? y Are you thinking of the letter ' '? n Are you thinking of the letter '!'? n Are you thinking of the letter '.'? n Are you thinking of the letter 'a'? n Are you thinking of the letter 'b'? n Are you thinking of the letter 'c'? n Are you thinking of the letter 'd'? n Are you thinking of the letter 'e'? n Are you thinking of the letter 'f'? n Are you thinking of the letter 'g'? n Are you thinking of the letter 'h'? n Are you thinking of the letter 'i'? n Are you thinking of the letter 'j'? n Are you thinking of the letter 'k'? n Are you thinking of the letter 'l'? n Are you thinking of the letter 'm'? n Are you thinking of the letter 'n'? n Are you thinking of the letter 'o'? n Are you thinking of the letter 'p'? n Are you thinking of the letter 'q'? n Are you thinking of the letter 'r'? n Are you thinking of the letter 's'? n Are you thinking of the letter 't'? y Are you thinking of the letter ' '? n Are you thinking of the letter '!'? y You typed: cat

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

Professional Microsoft SQL Server 2014 Administration

Authors: Adam Jorgensen, Bradley Ball

1st Edition

111885926X, 9781118859261

More Books

Students also viewed these Databases questions

Question

2. Place a value on the outcomes.

Answered: 1 week ago