Skip to content

snidarian/K-R

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

92 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Exercises from the K&R

All original C programming creations based on Ritchie and Kerneghan's exercise prompts. Additionally some files included in this repo are for future reference and efficient clarification on the capabilities of various header files.

Exercises completed and included in repo:

Chapter 1

  • Exercise 1-1 - Helloworld.c
  • Exercise 1-2 - Helloworldexp.c
  • Exercise 1-3 - modify temperature program to print header above table
  • Exercise 1-4 - Write program to print corresponding cel to fahr table
  • Exercise 1-5 - modify temp prog to print table in reverse order
  • Exercise 1-6 - verify the expression getchar() != EOF is 0 or 1
  • Exercise 1-7 - write a program to print the value of EOF
  • Exercise 1-8 - write a program to count blanks, tabs and newlines
  • Exercise 1-9 - write a program to cop its input to its output replacing multiple blanks with a single blank
  • Exercise 1-10 - write program that replaces tabs, backspaces and newlines with '\t', '\b' and '\n'
  • Exercise 1-11 - How would you test word count program? What kinds of input are likely to uncover bugs?
  • Exercise 1-12 - Write a program that prints its input to its output one word per line
  • Exercise 1-13 - write a program to print a histogram of the lengths of words in its input
  • Exercise 1-14 - write a program to print a histogram of the frequencies of different characters in its input
  • Exercise 1-15 - rewrite the temp conversion program to use a function for conversion
  • Exercise 1-16 - revise the main routine of the longest-line program to print the length of input lines
  • Exercise 1-17 - Write a program to print all input lines that are longer than 80 chars
  • Exercise 1-18 - Writes a program to remove trailing blanks and tabs from input lines and to delete entirely blank lines.
  • Exercise 1-19 - Reverse() function that reverses input a line at a time
  • Exercise 1-22 - foldlonginputlines.c

Chapter 2

  • Exercise 2-1 - limits_header.c
  • Exercise 2-4 - alt_squeeze.c

Chapter3

About

All original C programming creations based on Ritchie and Kerneghan's exercise prompts

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages