Presentation is loading. Please wait.

Presentation is loading. Please wait.

CS/COE 0449 (term 2174) Jarrett Billingsley

Similar presentations


Presentation on theme: "CS/COE 0449 (term 2174) Jarrett Billingsley"— Presentation transcript:

1 CS/COE 0449 (term 2174) Jarrett Billingsley
C - Basics CS/COE 0449 (term 2174) Jarrett Billingsley

2 Class announcements Well I was gonna start using Tophat today...
But a significant proportion of you haven't signed up yet 8) SO UH GET ON THAT Unless you're planning on dropping? Which you should do by next Wednesday, the 18th (add/drop ends) But please let me know what the situation is!!!!! Also is anyone unable to log into thoth? 1/10/2017 CS/COE term 2174

3 Caveats about the book... 1/10/2017 CS/COE term 2174

4 It's a good book, Brent. Its info on C is perfectly fine. BUT...
Its info on most other things is adorably outdated. Specifically info about platforms and integer sizes. It's a fun time capsule from 1991, when MS-DOS was popular, Windows had no memory protection, 16-bit CPUs on PCs were still commonplace, and source control software didn't exist. 1/10/2017 CS/COE term 2174

5 The compilation toolchain
1/10/2017 CS/COE term 2174

6 How programs are compiled
#include <stdio.h> int main() { printf("Hello!\n"); return 0; } hello.c hello.obj helper.obj dogs.obj libc.a/lib hello.exe Linker hello.obj Compiler 1/10/2017 CS/COE term 2174

7 What about assembler? Book mentions compiler outputting assembly, not object files. Mmmmnnnnneeeaahhhhhhnnnnnnnnnnn...... 1/10/2017 CS/COE term 2174

8 Okay time for C for real (feel free to log into thoth and try things out)
1/10/2017 CS/COE term 2174

9 Printing stuff! printf! String and character literals!
Escape sequences! 1/10/2017 CS/COE term 2174

10 Operators!!! Mathematical! Logical! Comparison! Bitwise!
Augmentation assignments! 'crements! 1/10/2017 CS/COE term 2174

11 Variables! Variable names! What's in a variable by default?
char* variables! 1/10/2017 CS/COE term 2174

12 Comments! /* */ in all versions of C. // in C99+.
Can you use // in C89 mode? Technically, no. Many compilers allow it, even in C89 mode, unless "strict". 1/10/2017 CS/COE term 2174

13 Numbers! Decimal, hex, and.... octal?? 1/10/2017 CS/COE term 2174

14 Control structures if, if-else, while, do-while, switch-case
for loops... Can you declare a variable inside the loop? OOOOooo only in C99+ 1/10/2017 CS/COE term 2174


Download ppt "CS/COE 0449 (term 2174) Jarrett Billingsley"

Similar presentations


Ads by Google