week11 - clark science center · •simple types • no string type! • no booleans (only 0 for...

77
mith College Computer Science Dominique Thiébaut [email protected] CSC231 Week 11— Introduction to C Fall 2019

Upload: others

Post on 30-Jul-2020

1 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Week11 - Clark Science Center · •Simple types • No string type! • No booleans (only 0 for false and !0 for true) • No classes, no objects, no OOP! Variables int -> integer

mith College

Computer Science

Dominique Thiébaut [email protected]

CSC231Week 11— Introduction to C

Fall 2019

Page 2: Week11 - Clark Science Center · •Simple types • No string type! • No booleans (only 0 for false and !0 for true) • No classes, no objects, no OOP! Variables int -> integer

https://kristv.com/sponsored/bay-area-bicycles/2019/02/25/from-training-wheels-to-two-wheels-tips-for-helping-kids-learn-to-ride/

Page 3: Week11 - Clark Science Center · •Simple types • No string type! • No booleans (only 0 for false and !0 for true) • No classes, no objects, no OOP! Variables int -> integer

hw9a.asm

test0.asm

231Lib.asm

hw9a.o

test0.o

231Lib.o

nasm

nasm

nasm

test0

ld

Page 4: Week11 - Clark Science Center · •Simple types • No string type! • No booleans (only 0 for false and !0 for true) • No classes, no objects, no OOP! Variables int -> integer

Outline

• Recursion: Towers of Hanoi

• C

Page 5: Week11 - Clark Science Center · •Simple types • No string type! • No booleans (only 0 for false and !0 for true) • No classes, no objects, no OOP! Variables int -> integer

D. Thiebaut, Computer Science, Smith College

Towers of Hanoi…in Assembly

• In Python first

• In Assembly next

https://media-cdn.tripadvisor.com/media/photo-s/0f/00/ee/18/ulun-danu-bratan-temple.jpg

Page 6: Week11 - Clark Science Center · •Simple types • No string type! • No booleans (only 0 for false and !0 for true) • No classes, no objects, no OOP! Variables int -> integer

D. Thiebaut, Computer Science, Smith College

https://youtu.be/2SUvWfNJSsM

What's the relationship

between Towers of Hanoi

and Serpinski?

Watch on

your own!

Page 7: Week11 - Clark Science Center · •Simple types • No string type! • No booleans (only 0 for false and !0 for true) • No classes, no objects, no OOP! Variables int -> integer

D. Thiebaut, Computer Science, Smith College

A B C

Page 8: Week11 - Clark Science Center · •Simple types • No string type! • No booleans (only 0 for false and !0 for true) • No classes, no objects, no OOP! Variables int -> integer

D. Thiebaut, Computer Science, Smith College

Write it in Python!

getcopy hanoi0.py

Page 9: Week11 - Clark Science Center · •Simple types • No string type! • No booleans (only 0 for false and !0 for true) • No classes, no objects, no OOP! Variables int -> integer

D. Thiebaut, Computer Science, Smith College

moveDisk( 5, Source, Dest, Extra )

moveDisk( 4, Source, Extra, Dest )

moveDisk( 1, Source, Dest, Extra )

moveDisk( 4, Extra, Dest, Source )

Page 10: Week11 - Clark Science Center · •Simple types • No string type! • No booleans (only 0 for false and !0 for true) • No classes, no objects, no OOP! Variables int -> integer

D. Thiebaut, Computer Science, Smith College

moveDisk( 5, Source, Dest, Extra )

moveDisk( 4, Source, Extra, Dest )

moveDisk( 1, Source, Dest, Extra )

moveDisk( 4, Extra, Dest, Source )

Page 11: Week11 - Clark Science Center · •Simple types • No string type! • No booleans (only 0 for false and !0 for true) • No classes, no objects, no OOP! Variables int -> integer

D. Thiebaut, Computer Science, Smith College

moveDisk( 5, Source, Dest, Extra )

moveDisk( 4, Source, Extra, Dest )

moveDisk( 1, Source, Dest, Extra )

moveDisk( 4, Extra, Dest, Source )

Page 12: Week11 - Clark Science Center · •Simple types • No string type! • No booleans (only 0 for false and !0 for true) • No classes, no objects, no OOP! Variables int -> integer

D. Thiebaut, Computer Science, Smith College

getcopy hanoi.asm

Page 13: Week11 - Clark Science Center · •Simple types • No string type! • No booleans (only 0 for false and !0 for true) • No classes, no objects, no OOP! Variables int -> integer

D. Thiebaut, Computer Science, Smith College

Page 14: Week11 - Clark Science Center · •Simple types • No string type! • No booleans (only 0 for false and !0 for true) • No classes, no objects, no OOP! Variables int -> integer

C for Assembly

Language Programmers

Computer Science Dominique Thiebaut

Page 15: Week11 - Clark Science Center · •Simple types • No string type! • No booleans (only 0 for false and !0 for true) • No classes, no objects, no OOP! Variables int -> integer

• Dennis Ritchie

• 1969 to 1973

• AT&T Bell Labs

• Close to Assembly

• Unix

• Standard

• Many languages based on C. (C++, Obj. C, C#)

• Many influenced by C (Java, Python, Perl)

Computer Science Dominique Thiebaut

Page 16: Week11 - Clark Science Center · •Simple types • No string type! • No booleans (only 0 for false and !0 for true) • No classes, no objects, no OOP! Variables int -> integer

• Dennis Ritchie

• 1969 to 1973

• AT&T Bell Labs

• Close to Assembly

• Unix

• Standard

• Many languages based on C. (C++, Obj. C, C#)

• Many influenced by C (Java, Python, Perl)

Computer Science Dominique Thiebaut

Page 17: Week11 - Clark Science Center · •Simple types • No string type! • No booleans (only 0 for false and !0 for true) • No classes, no objects, no OOP! Variables int -> integer

Missing from C…

• Exceptions

• Garbage collection

• OOP

• Polymorphism

• But…

Page 18: Week11 - Clark Science Center · •Simple types • No string type! • No booleans (only 0 for false and !0 for true) • No classes, no objects, no OOP! Variables int -> integer

• Exceptions

• Garbage collection

• OOP

• Polymorphism

• But… it is usually faster!

Missing from C…

Page 19: Week11 - Clark Science Center · •Simple types • No string type! • No booleans (only 0 for false and !0 for true) • No classes, no objects, no OOP! Variables int -> integer

Example: N-Queens Problem

http://www.science.smith.edu/dftwiki/index.php/CSC231:_N-Queens_Problem:_interpreted_vs_compiled

Page 20: Week11 - Clark Science Center · •Simple types • No string type! • No booleans (only 0 for false and !0 for true) • No classes, no objects, no OOP! Variables int -> integer

Example: N-Queens Problem

http://www.science.smith.edu/dftwiki/index.php/CSC231:_N-Queens_Problem:_interpreted_vs_compiled

Language Execution Time

Python 48 secC 1.4 secC with -O3 optimization      0.4 sec

Page 21: Week11 - Clark Science Center · •Simple types • No string type! • No booleans (only 0 for false and !0 for true) • No classes, no objects, no OOP! Variables int -> integer

Good Reference

• Essential C, by Nick Parlante, Stanford U. http://cslibrary.stanford.edu/101/EssentialC.pdf

Computer Science Dominique Thiebaut

Page 22: Week11 - Clark Science Center · •Simple types • No string type! • No booleans (only 0 for false and !0 for true) • No classes, no objects, no OOP! Variables int -> integer

JAVA

C

Page 23: Week11 - Clark Science Center · •Simple types • No string type! • No booleans (only 0 for false and !0 for true) • No classes, no objects, no OOP! Variables int -> integer

JAVA

C

POINTERS

OOP

(simplification)

Page 24: Week11 - Clark Science Center · •Simple types • No string type! • No booleans (only 0 for false and !0 for true) • No classes, no objects, no OOP! Variables int -> integer

Hello World!

#include <stdio.h>

int main() { printf("\nHello World\n"); return 0;}

Computer Science Dominique Thiebaut

Page 25: Week11 - Clark Science Center · •Simple types • No string type! • No booleans (only 0 for false and !0 for true) • No classes, no objects, no OOP! Variables int -> integer

Hello World!• Library

• Strings

• Block-structured language

• main() #include <stdio.h>

int main() { printf("\nHello World\n"); return 0;}

Computer Science Dominique Thiebaut

Page 26: Week11 - Clark Science Center · •Simple types • No string type! • No booleans (only 0 for false and !0 for true) • No classes, no objects, no OOP! Variables int -> integer

Hello World!• Library

• Strings

• Block-structured language

• main() #include <stdio.h>

int main() { printf("\nHello World\n"); return 0;}

Computer Science Dominique Thiebaut

getcopy C/hello.c

Page 27: Week11 - Clark Science Center · •Simple types • No string type! • No booleans (only 0 for false and !0 for true) • No classes, no objects, no OOP! Variables int -> integer

Compiling on Marax

• gcc Gnu compiler

• man gcc for help

[~/handout]$ gcc hello.c[~/handout]$ ./a.out

Hello World

[~/handout]$ gcc -o hello hello.c[~/handout]$ ./hello

Hello World

Computer Science Dominique Thiebaut

Page 28: Week11 - Clark Science Center · •Simple types • No string type! • No booleans (only 0 for false and !0 for true) • No classes, no objects, no OOP! Variables int -> integer

Files

Computer Science Dominique Thiebaut

Page 29: Week11 - Clark Science Center · •Simple types • No string type! • No booleans (only 0 for false and !0 for true) • No classes, no objects, no OOP! Variables int -> integer

• Write your own Hello World! program

• Make it print something like: ************ * C Rocks! * ************

Exercise

Computer Science Dominique Thiebaut

getcopy C/hello.c

[~/handout]$ gcc -o hello hello.c[~/handout]$ ./helloHello World!

Page 30: Week11 - Clark Science Center · •Simple types • No string type! • No booleans (only 0 for false and !0 for true) • No classes, no objects, no OOP! Variables int -> integer

• http://www.gnu.org/software/gnu-c-manual/gnu-c-manual.html

Computer Science Dominique Thiebaut

Good Reference

on C Compiler

Page 31: Week11 - Clark Science Center · •Simple types • No string type! • No booleans (only 0 for false and !0 for true) • No classes, no objects, no OOP! Variables int -> integer

Printing

•printf( "string with %-operators", list of vars);

•%d int

•%f float

•%s string

Computer Science Dominique Thiebaut

printf( "%3d %1.3f %s\n", 2, 3.14159, "CSC231 Assembly" );

Page 32: Week11 - Clark Science Center · •Simple types • No string type! • No booleans (only 0 for false and !0 for true) • No classes, no objects, no OOP! Variables int -> integer

Variables

Computer Science Dominique Thiebaut

Page 33: Week11 - Clark Science Center · •Simple types • No string type! • No booleans (only 0 for false and !0 for true) • No classes, no objects, no OOP! Variables int -> integer

• Simple types

• No string type!

• No booleans (only 0 for false and !0 for true)

• No classes, no objects, no OOP!

Variables

int -> integer variableshort -> short integerlong -> long integerfloat -> single precision real (floating point) variabledouble -> double precision real (floating point) variablechar -> character variable (single byte)

Computer Science Dominique Thiebaut

Page 34: Week11 - Clark Science Center · •Simple types • No string type! • No booleans (only 0 for false and !0 for true) • No classes, no objects, no OOP! Variables int -> integer
Page 35: Week11 - Clark Science Center · •Simple types • No string type! • No booleans (only 0 for false and !0 for true) • No classes, no objects, no OOP! Variables int -> integer
Page 36: Week11 - Clark Science Center · •Simple types • No string type! • No booleans (only 0 for false and !0 for true) • No classes, no objects, no OOP! Variables int -> integer

Comments

Computer Science Dominique Thiebaut

Page 37: Week11 - Clark Science Center · •Simple types • No string type! • No booleans (only 0 for false and !0 for true) • No classes, no objects, no OOP! Variables int -> integer

We stopped hereLast Time

We stopped hereLast Time

Page 38: Week11 - Clark Science Center · •Simple types • No string type! • No booleans (only 0 for false and !0 for true) • No classes, no objects, no OOP! Variables int -> integer

Strings(and String Functions)

Computer Science Dominique Thiebaut

Use "…" for strings

Use 'x' for characters

Page 39: Week11 - Clark Science Center · •Simple types • No string type! • No booleans (only 0 for false and !0 for true) • No classes, no objects, no OOP! Variables int -> integer

Strings

Computer Science Dominique Thiebaut

Page 40: Week11 - Clark Science Center · •Simple types • No string type! • No booleans (only 0 for false and !0 for true) • No classes, no objects, no OOP! Variables int -> integer

Strings

Computer Science Dominique Thiebaut

Page 41: Week11 - Clark Science Center · •Simple types • No string type! • No booleans (only 0 for false and !0 for true) • No classes, no objects, no OOP! Variables int -> integer

Strings

Computer Science Dominique Thiebaut

Page 42: Week11 - Clark Science Center · •Simple types • No string type! • No booleans (only 0 for false and !0 for true) • No classes, no objects, no OOP! Variables int -> integer

Strings

Computer Science Dominique Thiebaut

Page 43: Week11 - Clark Science Center · •Simple types • No string type! • No booleans (only 0 for false and !0 for true) • No classes, no objects, no OOP! Variables int -> integer

Strings

Computer Science Dominique Thiebaut

Page 44: Week11 - Clark Science Center · •Simple types • No string type! • No booleans (only 0 for false and !0 for true) • No classes, no objects, no OOP! Variables int -> integer

[~/handout/C]$ gcc strings.c[~/handout/C]$ ./a.out

sentence = hello world![~/handout/C]

Strings

Computer Science Dominique Thiebaut

Page 45: Week11 - Clark Science Center · •Simple types • No string type! • No booleans (only 0 for false and !0 for true) • No classes, no objects, no OOP! Variables int -> integer

A Few String Functionsstrcpy( dest, src )

copies the string pointed to by src to dest

strcat( dest, src )concatenate the string pointed to by src todest

strlen( src )returns the number of characters in thestring

more at https://www.tutorialspoint.com/c_standard_library/string_h.htm

Page 46: Week11 - Clark Science Center · •Simple types • No string type! • No booleans (only 0 for false and !0 for true) • No classes, no objects, no OOP! Variables int -> integer

A Few String Functionsstrstr( haystack, needle )

returns a pointer to the needle (string) in the stack (string), or NULL if not found.

strchr( haystack, char-needle )returns a pointer to the needle (char) in the stack (string), or NULL if not found.

more at https://www.tutorialspoint.com/c_standard_library/string_h.htm

Page 47: Week11 - Clark Science Center · •Simple types • No string type! • No booleans (only 0 for false and !0 for true) • No classes, no objects, no OOP! Variables int -> integer

Strings end with ‘\0’

Computer Science Dominique Thiebaut

'h' 'e' 'l' 'l' 'o' '\0'msg

Page 48: Week11 - Clark Science Center · •Simple types • No string type! • No booleans (only 0 for false and !0 for true) • No classes, no objects, no OOP! Variables int -> integer

Strings end with ‘\0’

Computer Science Dominique Thiebaut

'h' 'e' 'l' 'l' 'o' \0msg

msg2 'h' 'e' 'l' 'l' 'o' ' ' 't' 'h' 'e' 'r' 'e' '\0'

Page 49: Week11 - Clark Science Center · •Simple types • No string type! • No booleans (only 0 for false and !0 for true) • No classes, no objects, no OOP! Variables int -> integer

Strings end with ‘\0’

Computer Science Dominique Thiebaut

'h' 'e' 'l' 'l' 'o' \0msg

msg2 'h' 'e' 'l' 'l' 'o' ' ' 't' 'h' 'e' 'r' 'e' '\0'

msg3 'h' 'e' 'l' 'l' 'o' '\0' 't' 'h' 'e' 'r' 'e' '\0'

Page 50: Week11 - Clark Science Center · •Simple types • No string type! • No booleans (only 0 for false and !0 for true) • No classes, no objects, no OOP! Variables int -> integer

Strings end with ‘\0’

Computer Science Dominique Thiebaut

'h' 'e' 'l' 'l' 'o' '\0'msg

msg2 'h' 'e' 'l' 'l' 'o' ' ' 't' 'h' 'e' 'r' 'e' '\0'

msg3 'h' 'e' 'l' 'l' 'o' '\0' 't' 'h' 'e' 'r' 'e' '\0'

msg4 '\0' 'e' 'l' 'l' 'o' '\0' 't' 'h' 'e' 'r' 'e' '\0'

Page 51: Week11 - Clark Science Center · •Simple types • No string type! • No booleans (only 0 for false and !0 for true) • No classes, no objects, no OOP! Variables int -> integer

Strings end with ‘\0’

Computer Science Dominique Thiebaut

Page 52: Week11 - Clark Science Center · •Simple types • No string type! • No booleans (only 0 for false and !0 for true) • No classes, no objects, no OOP! Variables int -> integer

~/handout/C]$ ./a.outsentence = Hello world!sentence = Hello[~/handout/C]$

Strings end with ‘\0’

Computer Science Dominique Thiebaut

Page 53: Week11 - Clark Science Center · •Simple types • No string type! • No booleans (only 0 for false and !0 for true) • No classes, no objects, no OOP! Variables int -> integer

~/handout/C]$ ./a.outsentence = Hello world!sentence = Hello[~/handout/C]$

Strings end with ‘\0’

Computer Science Dominique Thiebaut

'h'

'e'

'l'

'l'

'o'

'\0'

Strings

are Mutable

Page 54: Week11 - Clark Science Center · •Simple types • No string type! • No booleans (only 0 for false and !0 for true) • No classes, no objects, no OOP! Variables int -> integer

• make the program compute your email account as the first letter of your first name and the first 8 letters of your last name.

Exercise

Computer Science Dominique Thiebaut

getcopy C/exercise1.c

Page 55: Week11 - Clark Science Center · •Simple types • No string type! • No booleans (only 0 for false and !0 for true) • No classes, no objects, no OOP! Variables int -> integer

#include <stdio.h> #include <string.h>

int main() { int a = 3; int b = 5; int c = 0; char firstName[] = "Mickey"; char lastName[] = "Mouse"; char account[100];

account[0] = firstName[0]; account[1] = '\0'; strcat( account, lastName ); account[8] = '\0';

printf( "%s %s, your account is: %s\n", firstName, lastName, account ); return 0; }

Solution

Computer Science Dominique Thiebaut

Page 56: Week11 - Clark Science Center · •Simple types • No string type! • No booleans (only 0 for false and !0 for true) • No classes, no objects, no OOP! Variables int -> integer

For-Loops

Computer Science Dominique Thiebaut

Page 57: Week11 - Clark Science Center · •Simple types • No string type! • No booleans (only 0 for false and !0 for true) • No classes, no objects, no OOP! Variables int -> integer

For-Loops

Computer Science Dominique Thiebaut

Page 58: Week11 - Clark Science Center · •Simple types • No string type! • No booleans (only 0 for false and !0 for true) • No classes, no objects, no OOP! Variables int -> integer

While-Loops

Computer Science Dominique Thiebaut

Page 59: Week11 - Clark Science Center · •Simple types • No string type! • No booleans (only 0 for false and !0 for true) • No classes, no objects, no OOP! Variables int -> integer

Infinite Loops

Computer Science Dominique Thiebaut

Page 60: Week11 - Clark Science Center · •Simple types • No string type! • No booleans (only 0 for false and !0 for true) • No classes, no objects, no OOP! Variables int -> integer

• Write a program that displays the first 10 fibonacci terms. Use a loop!

• You may use this code to get started. You can start printing 1, 2, 3 or 1, 1, 2, 3… Both solutions are fine. int fibn=1, fibn1=1, fibn2=0; fibn = fibn1 + fibn2; … printf( "%d\n", fibn );

Exercise, Part 1

Computer Science Dominique Thiebaut

Page 61: Week11 - Clark Science Center · •Simple types • No string type! • No booleans (only 0 for false and !0 for true) • No classes, no objects, no OOP! Variables int -> integer

• Take the solution for the previous exercise (getcopy C/fibonacci0.c) and replace the for-loop with a while loop that prints all the terms that less than 1000.

Computer Science Dominique Thiebaut

Exercise, Part 2

Page 62: Week11 - Clark Science Center · •Simple types • No string type! • No booleans (only 0 for false and !0 for true) • No classes, no objects, no OOP! Variables int -> integer

Symbolic Constants

Computer Science Dominique Thiebaut

Page 63: Week11 - Clark Science Center · •Simple types • No string type! • No booleans (only 0 for false and !0 for true) • No classes, no objects, no OOP! Variables int -> integer

Symbolic Constants

Computer Science Dominique Thiebaut

Page 64: Week11 - Clark Science Center · •Simple types • No string type! • No booleans (only 0 for false and !0 for true) • No classes, no objects, no OOP! Variables int -> integer

Symbolic Constants

Computer Science Dominique Thiebaut

After

preproce

ssing

Page 65: Week11 - Clark Science Center · •Simple types • No string type! • No booleans (only 0 for false and !0 for true) • No classes, no objects, no OOP! Variables int -> integer

Conditionals

Computer Science Dominique Thiebaut

Page 66: Week11 - Clark Science Center · •Simple types • No string type! • No booleans (only 0 for false and !0 for true) • No classes, no objects, no OOP! Variables int -> integer

Conditionals

Computer Science Dominique Thiebaut

&& and

|| or

! not

Page 67: Week11 - Clark Science Center · •Simple types • No string type! • No booleans (only 0 for false and !0 for true) • No classes, no objects, no OOP! Variables int -> integer

Conditionals (cont’d)

Computer Science Dominique Thiebaut

Page 68: Week11 - Clark Science Center · •Simple types • No string type! • No booleans (only 0 for false and !0 for true) • No classes, no objects, no OOP! Variables int -> integer

Computer Science Dominique Thiebaut

ints or chars, something countable

Conditionals (cont’d)

Page 69: Week11 - Clark Science Center · •Simple types • No string type! • No booleans (only 0 for false and !0 for true) • No classes, no objects, no OOP! Variables int -> integer

Pointers

Computer Science Dominique Thiebaut

Page 70: Week11 - Clark Science Center · •Simple types • No string type! • No booleans (only 0 for false and !0 for true) • No classes, no objects, no OOP! Variables int -> integer

Concept

Computer Science Dominique Thiebaut

x6.5

0FFF1F0A

px

RAM

Page 71: Week11 - Clark Science Center · •Simple types • No string type! • No booleans (only 0 for false and !0 for true) • No classes, no objects, no OOP! Variables int -> integer

Concept

Computer Science Dominique Thiebaut

x6.5

0FFF1F0A

px

RAM

Page 72: Week11 - Clark Science Center · •Simple types • No string type! • No booleans (only 0 for false and !0 for true) • No classes, no objects, no OOP! Variables int -> integer

Example: Initialize an Array

Computer Science Dominique Thiebaut

Using

indexing

3 4 1 9 3 4 6 6 1 0

0 1 2 3 4 5 6 7 8 9

A

Page 73: Week11 - Clark Science Center · •Simple types • No string type! • No booleans (only 0 for false and !0 for true) • No classes, no objects, no OOP! Variables int -> integer

Example: Initialize an Array

Computer Science Dominique Thiebaut

Using

indexing

Page 74: Week11 - Clark Science Center · •Simple types • No string type! • No booleans (only 0 for false and !0 for true) • No classes, no objects, no OOP! Variables int -> integer

Example: Initialize an Array

Computer Science Dominique Thiebaut

3 4 1 9 3 4 6 6 1 0

0 1 2 3 4 5 6 7 8 9

A

Using

pointers

Page 75: Week11 - Clark Science Center · •Simple types • No string type! • No booleans (only 0 for false and !0 for true) • No classes, no objects, no OOP! Variables int -> integer

Computer Science Dominique Thiebaut

Using

pointers

Example: Initialize an Array

Page 76: Week11 - Clark Science Center · •Simple types • No string type! • No booleans (only 0 for false and !0 for true) • No classes, no objects, no OOP! Variables int -> integer

./a.outp=0x7fff88d54560 A[0] = 0.00 *p = 0.00p=0x7fff88d54564 A[1] = 1.00 *p = 1.00p=0x7fff88d54568 A[2] = 2.00 *p = 2.00p=0x7fff88d5456c A[3] = 3.00 *p = 3.00p=0x7fff88d54570 A[4] = 4.00 *p = 4.00p=0x7fff88d54574 A[5] = 5.00 *p = 5.00p=0x7fff88d54578 A[6] = 6.00 *p = 6.00p=0x7fff88d5457c A[7] = 7.00 *p = 7.00p=0x7fff88d54580 A[8] = 8.00 *p = 8.00p=0x7fff88d54584 A[9] = 9.00 *p = 9.00

Computer Science Dominique Thiebaut

Page 77: Week11 - Clark Science Center · •Simple types • No string type! • No booleans (only 0 for false and !0 for true) • No classes, no objects, no OOP! Variables int -> integer

We Stopped HereLast Time