100701 1st

Preview:

DESCRIPTION

 

Citation preview

PU Study in summer vacation

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

Thursday, May 12, 2011

Preview

•Review basic C language

•Data Structure

Thursday, May 12, 2011

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

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

C - I/O

• Input - scanf- gets- file input

• output- printf- puts- file output

Thursday, May 12, 2011

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

Thursday, May 12, 2011

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

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

Thursday, May 12, 2011

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

Function

Prototype

int add (int, int)

Thursday, May 12, 2011

Function

Prototype

intadd

(int, int)

Thursday, May 12, 2011

Function

Prototype

intadd

(int, int)

return type

Thursday, May 12, 2011

Function

Prototype

intadd

(int, int)

return typename of function

Thursday, May 12, 2011

Function

Prototype

intadd

(int, int)

return typename of functionparameter

Thursday, May 12, 2011

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

Thursday, May 12, 2011

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

return c = a + b;}

Thursday, May 12, 2011

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

Recommended