EE 200 Lecture 4: Pointers Steven Bell 16 September 2019 Type of - - PowerPoint PPT Presentation

ee 200 lecture 4 pointers
SMART_READER_LITE
LIVE PREVIEW

EE 200 Lecture 4: Pointers Steven Bell 16 September 2019 Type of - - PowerPoint PPT Presentation

EE 200 Lecture 4: Pointers Steven Bell 16 September 2019 Type of an expression Variables have types: int tilapia; double anchovy; char *halibut; and so do expressions using them: (tilapia + 3.4) &anchovy *halibut const Read const


slide-1
SLIDE 1

EE 200

Steven Bell 16 September 2019

Lecture 4: Pointers

slide-2
SLIDE 2

Type of an expression

Variables have types:

int tilapia; double anchovy; char *halibut;

and so do expressions using them:

(tilapia + 3.4) &anchovy *halibut

slide-3
SLIDE 3

const

Read const expressions from right to left:

const int * swordfish; int * const tuna; const int * const haddock;

slide-4
SLIDE 4

C99

A new-ish standard version of C, which includes some helpful features int i; for(i = 0; i < 10; i++) for(int i = 0; i < 10; i++) gcc default: gcc -std=gnu99 Just add the -std=gnu99 flag to your compilation command We'll do this on the autograder as well

slide-5
SLIDE 5

Submitting code

Submit your code by pushing to Github and submitting to Gradescope.

slide-6
SLIDE 6

:! gcc....

ProTip

Use tabs in vim: :tabnew gt, gT Compile from vim: (and we'll learn more tricks next week)

slide-7
SLIDE 7

Homework 4 is hosted on Github

Code should be submitted on Gradescope by Friday (9/20) at 5pm. You should receive a welcome link by email.