Mondays 9:50-11:10 and Wednesdays 15:30-16:50
Date for final test: Monday, May 26th
May 12: C's Standard Functions for Strings - Cont'd
May 7: C's Standard Functions for Strings
String.h : strlen, strncmp, strchr, strcat, strrchr etc
May 2: Pointers
Make a program that prompts the user to input numbers until they input a -1, saves them in an array then adds the different numbers in the array together. Use functions when appropriate.
Please read through the following and follow the examples. Make sure you understand the code and how it works.
If you'd like further information
Starting a look at C!Some helpful tutorials
More time to study for Wednesday's quiz...Mock example for quiz:
Create a program meets the following criteria:
Continually prompts the user to enter a sentence and a character until the user enters -1.Has a function that takes an arguement of a string and a character and returns the number of times (as an integer) that the character occurs in that string using split(//, string) (which returns an array).
More about strings
Concepts and terms to know (and love):
functions/subroutinesarguements/parametersreturn valueintegersstring, character, ascii code whileloops conditionals/comparisonsif...else (and elsif) for arrayvariables and scalarsprototypechop<STDIN>print()error and bug fixing
Passing variables and returning variables from functoins/subroutines SubroutinesHomework: Create program that uses a function to calculate the temperature in farenheit when given the tempurature in celcius. See Wikipedia for more information on how to covert between the two.Examples from today's class
and the other way around
Lesson Feb 11:
Lesson Feb 4:
In class exampleHomework: Install Cygwin and Notepad++ at home and upload to Fronter a screenshot of your desktop as you work with a perl scriptOwn work with while and if BlocksCompound conditionals with while and if (if...else, if...elsif)Note: variables should be lower case! Upper case does work but is usually reserved for certain types of values (which we will cover later).
Lesson Jan 30:
Lesson Jan 23:
Lesson Jan 21:
Lesson Jan 16: Work on your own and read the following: