Sign in to confirm you’re not a bot
This helps protect our community. Learn more

What did we cover last lecture? Debugging • How to think about different bugs (code errors) • Some tricks and techniques to remove bugs from our code Characters • A new variable type! • Letters and other symbols

9:41

What are we covering today? Characters • Continuing characters Strings • Words that contain multiple characters Command Line Arguments

11:06

Helpful Functions getchar() is a function that will read a character from input • Reads a byte from standard input • Usually returns an int between 0 and 255 (ASCII code of the byte it read) • Can return a -1 to signify end of input, EOF which is why we use an int

16:07

Helpful Functions getchar() is a function that will read a character from in • Reads a byte from standard input • Usually returns an int between 0 and 255 (ASCII code of the byte it read) • Can return a -1 to signify end of input, EOF which is why we use an int

18:34

Working with multiple characters We can read in multiple characters (including space and newline) This code is worth trying out...you get to see that space and newline have ASCII codes!

22:17

Strings in Code Strings are arrays of type char, but they have a convenient shorthand

35:51

Arguments in argy are always strings But what if we want to use things like numbers? • We can read the strings in, but we might want to process them

58:21
Lecture 10, COMP1511 - Programming Fundamentals 2020 Term 3
Lecture 10 - Strings and Command Line Arguments We're at the halfway point of COMP1511 here! In this lecture, we'll be looking at connecting together characters into strings (like words and phrases). We'll also look at how we can get input from the same command that runs the program and tie it all together into a demo program.

What did we cover last lecture? Debugging • How to think about different bugs (code errors) • Some tricks and techniques to remove bugs from our code Characters • A new variable type! • Letters and other symbols

9:41

What are we covering today? Characters • Continuing characters Strings • Words that contain multiple characters Command Line Arguments

11:06

Helpful Functions getchar() is a function that will read a character from input • Reads a byte from standard input • Usually returns an int between 0 and 255 (ASCII code of the byte it read) • Can return a -1 to signify end of input, EOF which is why we use an int

16:07

Helpful Functions getchar() is a function that will read a character from in • Reads a byte from standard input • Usually returns an int between 0 and 255 (ASCII code of the byte it read) • Can return a -1 to signify end of input, EOF which is why we use an int

18:34

Follow along using the transcript.

Marc Chee

1.61K subscribers