100701 1st

16
PU Study in summer vacation Leader : 홍범진 Members : 김동우, 김현우, 오승택, 이미지, 이희민 Thursday, May 12, 2011

Upload: picshbj

Post on 01-Nov-2014

336 views

Category:

Technology


0 download

DESCRIPTION

 

TRANSCRIPT

Page 1: 100701 1st

PU Study in summer vacation

Leader : 홍범진Members : 김동우, 김현우, 오승택, 이미지, 이희민

Thursday, May 12, 2011

Page 2: 100701 1st

Preview

•Review basic C language

•Data Structure

Thursday, May 12, 2011

Page 3: 100701 1st

Review basic C language

• input / output

• for, while, do~while, switch, if

• function

• array, pointer, memory allocate and free (Dynamic allocate)

• structure

Thursday, May 12, 2011

Page 4: 100701 1st

Data structure• Linked List

- What is the Linked List?

• ADT(Abstract data type)- Queue- Stack

• Sort (array, linked list)- Insertion sort- Selection sort- Bubble sort- etc..

Thursday, May 12, 2011

Page 5: 100701 1st

C - I/O

• Input - scanf- gets- file input

• output- printf- puts- file output

Thursday, May 12, 2011

Page 6: 100701 1st

What is the meaning of ‘f ’ in printf and scanf?

Thursday, May 12, 2011

Page 7: 100701 1st

What is the meaning of ‘f ’ in printf and scanf?

Answer - The meaning of ‘f ’ is ‘formatted’.

Thursday, May 12, 2011

Page 8: 100701 1st

What is the meaning of ‘f ’ in printf and scanf?

- Examples -%c %d %f %s %o %u

%x %X %e %E %g %G

Answer - The meaning of ‘f ’ is ‘formatted’.

Thursday, May 12, 2011

Page 9: 100701 1st

Function

Prototype

int add (int, int)

Thursday, May 12, 2011

Page 10: 100701 1st

Function

Prototype

intadd

(int, int)

Thursday, May 12, 2011

Page 11: 100701 1st

Function

Prototype

intadd

(int, int)

return type

Thursday, May 12, 2011

Page 12: 100701 1st

Function

Prototype

intadd

(int, int)

return typename of function

Thursday, May 12, 2011

Page 13: 100701 1st

Function

Prototype

intadd

(int, int)

return typename of functionparameter

Thursday, May 12, 2011

Page 14: 100701 1st

Functionint add (int a, int b)int a, int b

Thursday, May 12, 2011

Page 15: 100701 1st

Functionint add (int a, int b) { int a, b, c;

return c = a + b;}

Thursday, May 12, 2011

Page 16: 100701 1st

Function• return type and parameter

- void- int, float, double- bool- etc..

• name- It can’t be start with number or special character (except under bar ‘_’) - Avoid to name as keyword or library function (ex. printf, int, return, etc)

Thursday, May 12, 2011