HW4 - COMP 242 - HOMEWORK 4 Question 1 Write a C program...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
COMP 242 - HOMEWORK 4 Question 1 Write a C program that will input an English text (no Turkish characters) and then will display the frequency of characters as seen in the output example below. The bold text is input by the user. The input phase will be ended by a zero (‘0’) character at the first column of the line being input (Don’t forget! The zero input will be treated as character ‘0’ not the numeric value 0). The program will give the list of character frequencies (4 characters in one line) in a formatted manner. The input text should be stored in a two dimensional character array. Maximum size of a line should be 80 characters long and maximum number of lines should be 20. The program should have at least two functions: The first function will count the characters in the text string The second function will display the character frequencies Welcome to character frequency count program! Enter multiple lines of string. (Maximum 80 characters long) 0 ends the program. This line is the first one. It contains multiple aaaaaaaaas This is the second line that contains some bbbbbbbbbbbbbbb bbbbbbbbbb Numbers such as 0123456789 are excluded 0 End of text input! The character frequencies are
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 10/24/2008 for the course COMP 302 taught by Professor Stasiran during the Fall '08 term at Koç University.

Page1 / 2

HW4 - COMP 242 - HOMEWORK 4 Question 1 Write a C program...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online