TECH 104 Programming Fundamentals - C Programming Assignment

Assignment Help C/C++ Programming
Reference no: EM132460764

TECH 104 Programming Fundamentals - C Programming Assignment, Humber College, Canada

Lab - Strings

Write a program that finds the "smallest" and "largest" in a series of words. After the user enters the words, the program will determine which words would come first and last if the words were listed in dictionary order. The program must stop accepting input when the user enters a four-lettered word.

1) Use two strings named smallest_word and largest_word to keep track of the "smallest" and "largest" words entered so far. Assume that no word is more than 20 letters long.

2) Use a third string with a name current_word. The current_word will store every word entered by the user.

3) Prompt the user to enter a word.

4) Use a read_line function from slide 13 of lesson 10 to get the string from the user (Pass current_word and its size to read_line. Convert return type of read_line to void)

5) In your main program, use strcpy function to copy current_word into smallest_word and largest_word, respectively.

6) Use strlen for condition of while loop to determine when the user has entered a four-letter word.

Inside while loop

7) Prompt the user again to enter a word.

8) Call read_line function.

9) Use an if statement with condition using strcmp to compare current_word with smallest_word; if the new word is "smaller", use strcpy to save it in smallest_word.

10) Use an if statement with condition using strcmp to compare current_word with largest_word; if the new word is "larger", use strcpy to save it in largest_word.

1266_figure.png

Note that if you #include <stdlib.h> you can use system("pause"); and system("cls"); to pause your program or clear the screen.

In a word document provide a cut and paste of your .c code as well as an image of your program output for one menu option. Submit your word document through blackboard. Remember to include <string.h>.

Reference no: EM132460764

Questions Cloud

Derive the algebraic equation for the isorevenue line : Derive the algebraic equation for the isorevenue line. Explain the significance of the intercept and the slope of the isorevenue line
Decision rule for choosing the optimal combination of output : Explain why this must be true. Explain the decision rule for choosing the optimal combination of output that maximizes profit.
Write about the army leadership argumentative paper : Why you think that particular aspect of leadership is the most important, with respect to the duty positions and responsibilities of a Captain in the U.S. Army
What is the optimal level of production of wine decanters : What is the optimal level of production of wine decanters? What the marginal revenue of the last decanter sold.
TECH 104 Programming Fundamentals - C Programming Assignment : TECH 104 Programming Fundamentals - C Programming Assignment Help and Solution, Humber College, Canada. Write program that finds smallest series of words
Rate of new-product development in countries : What factors affect the rate of new-product development in countries?
COU103A Human development across the life span Assignment : COU103A Human development across the life span Assignment Help and Solution, Torrens University - Assessment Writing Service - Developmental period.
Uniform pricing-3rd degree price discrimination : If the fixed cost is 150,000 per month, marginal cost is 50.00, price is 50.00, Qd is 14,455 what is the formula to calculate the profits and what is the profit
Discuss role of discretion in decision made by public safety : Discuss the role of discretion in decisions made by public safety,Discuss the importance of decision-making as a skill for public safety leaders.

Reviews

Write a Review

C/C++ Programming Questions & Answers

  Create program that uses functions and reference parameters

Create program that uses functions and reference parameters, and asks user for the outside temperature.

  Write a program using vectors and iterators

Write a program using vectors and iterators that allows a user to maintain a personal list of DVD titles

  Write the code required to analyse and display the data

Calculate and store the average for each row and column. Determine and store the values for the Average Map.

  Write a webservices application

Write a webservices application that does a simple four function calculator

  Iimplement a client-server of the game

Iimplement a client-server version of the rock-paper-scissors-lizard-Spock game.

  Model-view-controller

Explain Model-View-Controller paradigm

  Design a nested program

How many levels of nesting are there in this design?

  Convert celsius temperatures to fahrenheit temperatures

Write a C++ program that converts Celsius Temperatures to Fahrenheit Temperatures.

  Evaluate and output the value in the given base

Write C program that will input two values from the user that are a Value and a Base with which you will evaluate and output the Value in the given Base.

  Design a base class shape with virtual functions

Design a base class shape with virtual functions

  Implementation of classes

Implementation of classes Chart and BarChart. Class barChart chould display a simple textual representation of the data

  Technical paper: memory management

Technical Paper: Memory Management, The intent of this paper is to provide you with an in depth knowledge of how memory is used in executing, your programs and its critical support for applications.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd