ๆญฏ9์žฅ.PDF

Size: px
Start display at page:

Download "ๆญฏ9์žฅ.PDF"

Transcription

1 9 Hello!! C

2 printf() scanf() getchar() putchar() gets() puts() fopen() fclose() fprintf() fscant() fgetc() fputs() fgets() gputs() fread() fwrite() fseek() ftell() I/O 2

3 (stream) C (text stream) : `/n' (binary stream) : (file) open close exit() 3

4 C stdin standard input file 0 stdout standard output file 1 stderr standard error file 2 "stdioh" 4

5 printf() scanf() printf() print formatted printf() printf(, ); 5

6 printf() scanf() %d : int %ld : long %x : int 16 %lx : long 16 %o : int 8 %lo : long 8 %u : unsigned %lu : long unsigned %e : %f : %g : %e %f %p : %c : %s : 6

7 printf() scanf() [ 9-1] printf("%5d", a); [ ]

8 printf() scanf() [ 9-2] #include <stdioh> main() { float a, b; a = 150; b = 30; printf(" = %82f\n", a+b); printf(" = %82f\n", a-b); printf(" = %82f\n", a*b); printf(" = %82f\n", a/b); } [ ] = 1800 = 1200 = 4500 = 500 8

9 printf() scanf() scanf() scanf() printf() (call by reference) & scanf(, ); 9-3, 9-4 9

10 printf() scanf() [ 9-3] #include <stdioh> main() { int a, b; float average; } printf("input data = "); scanf("%d %d", &a, &b); average = (a+b)/2; printf("average of two numbers = %f\n",average); [ ] input data = 10, 20 average of two numbers =

11 printf() scanf() [ 9-4] #include <stdioh> main() { double x, y, average = 00; printf("input data(x, y) = "); scanf("%f %f", &x, &y); printf("sum of two numbers = %f\n", x+y); printf("average of two numbers = %f\n", (x+y)/2); } [ ] input data(x, y) = 100, 200 sum of two numbers = average of two numbers =

12 getchar() putchar() getchar() putchar() char ch; ch = getchar(); putchar(ch); 12

13 getchar() putchar() [ 9-5] #include <stdioh> main() { char str; str = getchar(); putchar(str); putchar('\n'); putchar('a'); } [ ] d d A 13

14 getchar() putchar() [ 9-6] #include <stdioh> main() { char str; str = getchar(); while(str!= EOF) putchar(str); } [ ] example example ABCD EFG ABCD EFG ^Z 14

15 gets() puts() gets() scanf() scanf() <Enter>, gets() <Entert> : + 1 NULL puts() NULL char name[10]; gets(name); puts(name); 15

16 gets() puts() [ 9-7] #include <stdioh> main() { char name[15], irum[15]; gets(name); scanf("%s", irum); printf("name = %s\n", name); printf("irum = %s\n", irum); } [ ] name = Hong Gil Dong irum = Hong 16

17 gets() puts() [ 9-8] #include <stdioh> main() { char ch[15]; gets(ch); printf("%s", ch); puts(ch); } [ ] Hong Gil DongHong Gil Dong 17

18 : "datain : "dataout : "mainc 3 18

19 19 fopen() fclose() fscanf() fprintf() fgetc() fputc() fgets() fputs()

20 fopen() fclose() fopen() filename mode FILE *fopen(filename, mode) constchar *filename; constchar *mode; / * filename : */ /* mode : */ 20

21 fopen() fclose() (mode) "r" "w" "a" "r+" ( ) "w+" "a+", "rb" "wb" "ab" "rb+" "wb+" "ab+", 21

22 fopen() fclose() [ 9-9] FILE *in, *out; in = fopen("examplein", "r"); out = fopen("exampleout", "w"); 22

23 fopen() fclose() fclose() :, int fclose(fptr); FILE *fptr; /* fptr : */ exit() 23

24 fopen() fclose() [ 9-10] #include <stdioh> main() { FILE *in, *out; } /* */ /* */ in = fopen("examplein", "r"); out = fopen("exampleout", "w"); fclose(in); fclose(out); /* */ 24

25 fprintf() fscant() fprintf() : printf() int fprintf(fptr, format, argument list); FILE *fptr; constchar *format; /* fptr : */ /* format : */ printf() fprintf(stdout, format, argument list); printf(format, argument list); 25

26 fprintf() fscant() fscanf() : scanf() int fscanf(fptr, format, argument list); FILE *fptr; const char *format; /* fptr : */ /* format : */ scanf() fscanf(stdin, format, argument list); scanf(format, argument list); 26

27 fprintf() fscant() [ 9-11] #include <stdioh> #include <stdlibh> main() { int kor, eng, mat, total; float average; FILE *in, *out; in = fopen("examplein", "r"); out = fopen("exampleout", "w"); if( in == NULL){ printf("file not found!!!"); exit(1); } 27

28 fprintf() fscant() [ 9-11] } fprintf(out, " *********** *********** \n"); fprintf(out, " \n\n"); while( fscanf(in, "%d %d %d", &kor, &eng, &mat)!= EOF ){ total = kor + eng + mat; average = total/3; fprintf(out, "%6d %8d %9d %82f\n", kor, eng,mat, total, average); } fclose(in); fclose(out); 28

29 fprintf() fscant() [ 9-11] [ ] *********** ***********

30 fgetc() fputc() fgetc() : int int fgetc(fptr); FILE *fptr; /* fptr : */ 30

31 fgetc() fputc() fputc() : int fputc(ch, fptr); FILE *fptr; 9-12 char ch; /* fptr : */ /* ch : */ fgetc() fputc() 31

32 fgetc() fputc() [ 9-12] #include <stdioh> #include <stdlibh> main(){ char ch; FILE *in, *out; in = fopen("examplec", "r"); if(in== NULL) { printf("file not found!!!\n") exit(1) } out = fopen("copyc", "w"); while((ch = fgetc(in))!= EOF) fputc(ch, out); [ ] fclose(in); examplec" fclose(out); copyc" } 32

33 fgets() fputs() fgets() : s ( \n ) EOF NULL char *fgets(s, n, fptr); char *s; int n; FILE *fptr; /* s : */ /* n : */ /* fptr : */ 33

34 fgets() fputs() fputs() : s int fputs(s, fptr); char *s; FILE *fptr; /* s : */ /* fptr : */ 34

35 fgets() fputs() [ 9-13] /* filename : inputc */ The limits in your life are the size of your ideas and your of determination degree #include <stdioh> main(){ char buf[256]; FILE *in, *out; int cnt = 0; in = fopen("inputc", "r"); out = fopen("outputc", "w"); while(fgets(buf, 256, in)!= NULL) { fputs(buf, out); ++cnt; } 35

36 fgets() fputs() [ 9-13] printf("this file includes %d lines\n", cnt); fclose(in); fclose(out); } [ ] This file includes 2 lines, "outputc" inputc" 36

37 fread() fwrite() fread() : n cnt buf int fread(buf, n, cnt, fptr); void *buf; int n; int cnt; FILE *fptr; /* buf : */ /* n : */ /* cnt : */ /* fptr : */ 37

38 fread() fwrite() fwrite() : int fwrite(buf, n, cnt, fptr); char *buf; int n; int cnt; FILE *fptr; /* buf : */ /* n : */ /* cnt : */ /* fptr : */ 38

39 fread() fwrite() [ 9-14] #include <stdioh> main() { FILE *fp; float f = 1005; if((fp = fopen("testc", "wb")) == NULL) { printf("cannot open file!\n"); return; } fwrite(&f, sizeof(float), 1, fp); fclose(fp); } 39

40 fseek() ftell() fseek() int fseek(fptr, offset, whence); FILE *fptr; long int offset; int whence; /* fptr : */ /* offset : */ /* whence : offset */ 40

41 fseek() ftell() Fseek() :, offset whence offset long whence 0 : (SEEK_SET) 1 : (SEEK_CUR) 2 : (SEEK_END) 41

42 fseek() ftell() ftell() long int ftell(fptr); FILE *fptr; /* fptr : */ 9-15,, 42

43 fseek() ftell() [ 9-15] #include <stdioh> main() { long int num, score, size = 16L; static char name[11], ch; FILE *out; out = fopen("randomdat", "w"); while(1){ printf("\n, ( 10 ), \n"); scanf("%1d %10s %3d", &num, &name, &score); fseek(out, (num-1)*size, 0); fprintf(out, "%3d %10s %3d", num, name, score); printf("? (Y/N)"); ch = getchar(); 43

44 fseek() ftell() [ 9-15] if((ch == 'Y' ch == 'y') continue; else break; } fclose(out); } [ ] [ ] randomdat

chap7.key

chap7.key 1 7 C 2 7.1 C (System Calls) Unix UNIX man Section 2 C. C (Library Functions) C 1975 Dennis Ritchie ANSI C Standard Library 3 (system call). 4 C?... 5 C (text file), C. (binary file). 6 C 1. : fopen( )

More information

Microsoft PowerPoint - chap13-์ž…์ถœ๋ ฅ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ.pptx

Microsoft PowerPoint - chap13-์ž…์ถœ๋ ฅ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ.pptx #include int main(void) int num; printf( Please enter an integer: "); scanf("%d", &num); if ( num < 0 ) printf("is negative.\n"); printf("num = %d\n", num); return 0; 1 ํ•™์Šต๋ชฉํ‘œ ์ŠคํŠธ๋ฆผ์˜ ๊ธฐ๋ณธ ๊ฐœ๋…์„ ์•Œ์•„๋ณด๊ณ ,

More information

Microsoft PowerPoint - ์ œ11๊ฐ• ํŒŒ์ผ ์ฒ˜๋ฆฌ

Microsoft PowerPoint - ์ œ11๊ฐ• ํŒŒ์ผ ์ฒ˜๋ฆฌ ์ œ13์žฅ ํŒŒ์ผ ์ฒ˜๋ฆฌ ํŒŒ์ผ์—ด๊ธฐ : File Open FILE *fp; fp=fopen( filename, r ); File handling mode: r, w, a, rb, wb, ab, r+, w+, a+ fclose(fp) ํŒŒ์ผ์˜์ข…๋ฅ˜ : Text File, Binary File Text file:.txt,.doc,.hwp Binary file:.exe,.jpg,.gif,.mov,.mpeg,.tif,.pgm,.ppm.

More information

<4D F736F F F696E74202D2034C5D8BDBAC6AEC6C4C0CFC0D4C3E2B7C2312E505054>

<4D F736F F F696E74202D2034C5D8BDBAC6AEC6C4C0CFC0D4C3E2B7C2312E505054> ์˜๋ฃŒํ”„๋กœ๊ทธ๋ž˜๋ฐ์‹ค์Šต ์˜๋ฃŒ๊ณตํ•™๊ณผ์ด๊ธฐ์˜ 1 Chap. 11 ํŒŒ์ผ์ž…์ถœ๋ ฅ 2 1 ์ด์žฅ์˜๋ชฉํ‘œ ํ…์ŠคํŠธํŒŒ์ผ์˜์ž…์ถœ๋ ฅ๋ฐฉ๋ฒ•์„์ตํžŒ๋‹ค. (284 ์ชฝ๊ทธ๋ฆผ์ฐธ์กฐ ) 3 C ์–ธ์–ด์˜ํŒŒ์ผ์ข…๋ฅ˜ ํ…์ŠคํŠธํŒŒ์ผ (text file) ์‚ฌ๋žŒ๋“ค์ด์ฝ์„์ˆ˜์žˆ๋Š”๋ฌธ์ž๋“ค์„์ €์žฅํ•˜๊ณ ์žˆ๋Š”ํŒŒ์ผ ํ…์ŠคํŠธํŒŒ์ผ์—์„œ ํ•œ์ค„์˜๋ ์„๋‚˜ํƒ€๋‚ด๋Š”ํ‘œํ˜„์€ํŒŒ์ผ์ด์ฝ์–ด๋“ค์—ฌ์งˆ๋•Œ, C ๋‚ด๋ถ€์˜๋ฐฉ์‹์œผ๋กœ๋ณ€ํ™˜๋œ๋‹ค. ์ด์ง„ํŒŒ์ผ (binary file) : ์ž๋ฃŒํ˜•๊ทธ๋Œ€๋กœ์˜๋ฐ”์ดํŠธ์ˆ˜๋กœ์—ฐ์†ํ•ด์„œ์ €์žฅ

More information

untitled

untitled while do-while for break continue while( ) ; #include 0 i int main(void) int meter; int i = 0; while(i < 3) meter = i * 1609; printf("%d %d \n", i, meter); i++; return 0; i i< 3 () 0 (1)

More information

๊ธˆ์˜ค๊ณต๋Œ€ ์ปดํ“จํ„ฐ๊ณตํ•™์ „๊ณต ๊ฐ•์˜์ž๋ฃŒ

๊ธˆ์˜ค๊ณต๋Œ€ ์ปดํ“จํ„ฐ๊ณตํ•™์ „๊ณต ๊ฐ•์˜์ž๋ฃŒ C ํ”„๋กœ๊ทธ๋ž˜๋ฐํ”„๋กœ์ ํŠธ Chap 24. ํŒŒ์ผ์ž…์ถœ๋ ฅ 2013.11.27. ์˜ค๋ณ‘์šฐ ์ปดํ“จํ„ฐ๊ณตํ•™๊ณผ ํŒŒ์ผ (File) ์ž…์ถœ๋ ฅ ํ‘œ์ค€์ž…์ถœ๋ ฅ vs. ํŒŒ์ผ์ž…์ถœ๋ ฅ HDD ํ”„๋กœ๊ทธ๋ž˜๋จธ์ž…์žฅ์—์„œ๋Š”๋™์ผํ•œ๋ฐฉ๋ฒ•์œผ๋กœ์ž…์ถœ๋ ฅ ๋‹ค๋งŒ file ์„์ฝ๊ณ ์“ฐ๊ธฐ์ „์— Open ํ•ด์„œ์ŠคํŠธ๋ฆผ์—๋Œ€ํ•œํŒŒ์ผํฌ์ธํ„ฐ (file pointer) ๋ฅผ์–ป์–ด์•ผํ•œ๋‹ค. OS ๊ฐ€์‹ค์ œ์ž‘์—…์„๋Œ€ํ–‰ํ•˜๋ฉฐ, ํ”„๋กœ๊ทธ๋ž˜๋จธ๋Š”์ ์ ˆํ•œํ•จ์ˆ˜๋ฅผ์ ์ ˆํ•œ๋ฐฉ๋ฒ•์œผ๋กœํ˜ธ์ถœ Department

More information

Microsoft PowerPoint - chap4 [ํ˜ธํ™˜ ๋ชจ๋“œ]

Microsoft PowerPoint - chap4 [ํ˜ธํ™˜ ๋ชจ๋“œ] ์ œ 5 ์žฅ C ํ‘œ์ค€๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ ์ˆ™๋Œ€์ฐฝ๋ณ‘๋ชจ 1 ๋ชฉํ‘œ C ํ‘œ์ค€๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ์˜๊นŠ์ด์žˆ๋Š”์ดํ•ด ์‹œ์Šคํ…œํ˜ธ์ถœ๊ณผ C ํ‘œ์ค€๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ๊ด€๊ณ„ ์ˆ™๋Œ€์ฐฝ๋ณ‘๋ชจ 2 C ์ž…์ถœ๋ ฅ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌํ•จ์ˆ˜ ์ˆ™๋Œ€์ฐฝ๋ณ‘๋ชจ 3 ์‹œ์Šคํ…œํ˜ธ์ถœ๊ณผ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌํ•จ์ˆ˜ System Calls well defined entry points directly into the kernel documented in section 2 of the

More information

์Šฌ๋ผ์ด๋“œ 1

์Šฌ๋ผ์ด๋“œ 1 14 ์ฐจ์‹œ ํŒŒ์ผ (2) ๊ฐ• C ํ”„๋กœ๊ทธ๋ž˜๋ฐ 10 ๋ฉ”๋ชจ๋ฆฌ ๋ฉ”๋ชจ๋ฆฌ ์ฃผ๋ฉ”๋ชจ๋ฆฌ : ์†๋„๊ฐ€๋น ๋ฅด๋‹ค. ๊ฐ€๊ฒฉ์ด๋น„์‹ธ๋‹ค. ํœ˜๋ฐœ์„ฑ. ํ”„๋กœ๊ทธ๋žจ์‹คํ–‰์—ํ•„์ˆ˜ ๋ณด์กฐ๋ฉ”๋ชจ๋ฆฌ : ์†๋„๊ฐ€๋Š๋ฆฌ๋‹ค. ๊ฐ€๊ฒฉ์ด์‹ธ๋‹ค. ์˜๊ตฌ์ . ์˜๊ตฌ์ ์ธ์ž๋ฃŒ๋ณด๊ด€, ๋Œ€์šฉ๋Ÿ‰์˜๋ฐ์ดํ„ฐ๋Š”๋ณด์กฐ๋ฉ”๋ชจ๋ฆฌ์ด์šฉ ํŒŒ์ผ ์ด๋ฆ„ + ํ™•์žฅ์ž, ๋‚ ์งœ, ํฌ๊ธฐ ํด๋” ๊ฐ• C ํ”„๋กœ๊ทธ๋ž˜๋ฐ 11 ํ”„๋กœ๊ทธ๋žจ์ดํŒŒ์ผ์„์ง€์›ํ•˜๋ฉด 1 ํ”„๋กœ๊ทธ๋žจ์‹คํ–‰์˜์—ฐ์†์„ฑ 2 ๋ฒˆ๊ฑฐ๋กœ์šด๋ฐ์ดํ„ฐ์ž…๋ ฅ์ž๋™ํ™”

More information

Microsoft PowerPoint - 09_(C_Programming)_(Korean)_File_Processing

Microsoft PowerPoint - 09_(C_Programming)_(Korean)_File_Processing C Programming ํŒŒ์ผ์ฒ˜๋ฆฌ (File Processing) Seo, Doo-Ok Clickseo.com clickseo@gmail.com ๋ชฉ ์ฐจ ํŒŒ์ผ์ž…์ถœ๋ ฅ ํ…์ŠคํŠธํŒŒ์ผ์ž…์ถœ๋ ฅํ•จ์ˆ˜ ์ด์ง„ํŒŒ์ผ์ž…์ถœ๋ ฅํ•จ์ˆ˜ ๋‹ค์–‘ํ•œํŒŒ์ผ์ฒ˜๋ฆฌํ•จ์ˆ˜ 2 ํŒŒ์ผ์ž…์ถœ๋ ฅ ํŒŒ์ผ์ž…์ถœ๋ ฅ ์ž…์ถœ๋ ฅ์ŠคํŠธ๋ฆผ ํŒŒ์ผ๊ณผํŒŒ์ผ์ž…์ถœ๋ ฅ ํ…์ŠคํŠธํŒŒ์ผ์ž…์ถœ๋ ฅํ•จ์ˆ˜ ์ด์ง„ํŒŒ์ผ์ž…์ถœ๋ ฅํ•จ์ˆ˜ ๋‹ค์–‘ํ•œํŒŒ์ผ์ฒ˜๋ฆฌํ•จ์ˆ˜ 3 ์ŠคํŠธ๋ฆผ (Stream) ๋ฐ์ดํ„ฐ์˜๋…ผ๋ฆฌ์ ํ๋ฆ„

More information

C Programming

C Programming C Programming ํŒŒ์ผ์ž…์ถœ๋ ฅ Seo, Doo-okok clickseo@gmail.com http://www.clickseo.com ๋ชฉ ์ฐจ ํŒŒ์ผ์ž…์ถœ๋ ฅ ํŒŒ์ผ์ž…์ถœ๋ ฅํ•จ์ˆ˜ ํŒŒ์ผ์ฒ˜๋ฆฌํ•จ์ˆ˜ 2 ํŒŒ์ผ์ž…์ถœ๋ ฅ ํŒŒ์ผ์ž…์ถœ๋ ฅ ํŒŒ์ผ์˜์ดํ•ด ํŒŒ์ผ์ž…์ถœ๋ ฅ์˜์ดํ•ด ํŒŒ์ผ์ž…์ถœ๋ ฅํ•จ์ˆ˜ ํŒŒ์ผ์ฒ˜๋ฆฌํ•จ์ˆ˜ 3 ํŒŒ์ผ์˜์ดํ•ด ํŒŒ์ผ (File) ํ•˜๋‚˜์˜๋‹จ์œ„๋กœ์ทจ๊ธ‰ํ•ด์•ผํ•˜๋Š”๋ฐ์ดํ„ฐ๋“ค์˜์™ธ๋ถ€์ ์ปฌ๋ ‰์…˜ ํŒŒ์ผ์˜์ข…๋ฅ˜ ํ…์ŠคํŠธํŒŒ์ผ :

More information

untitled

untitled if( ) ; if( sales > 2000 ) bonus = 200; if( score >= 60 ) printf(".\n"); if( height >= 130 && age >= 10 ) printf(".\n"); if ( temperature < 0 ) printf(".\n"); // printf(" %.\n \n", temperature); // if(

More information

1 2 3 4 5 6 7 8 9 10 1 2 3 4 5 6 7 8 9 10 1 2 3 4 5 6 7 8 9 10 #define _CRT_SECURE_NO_WARNINGS #include #include main() { char ch; printf(" ๋ฌธ์ž 1๊ฐœ๋ฅผ์ž…๋ ฅํ•˜์‹œ์˜ค : "); scanf("%c", &ch); if (isalpha(ch))

More information

ร€ยฉยตยตยณร—ร†ยฎยฟรทร‡รยทรŽยฑร—ยทยกยนร–4ร€รฅ_รƒร–รยพ

ร€ยฉยตยตยณร—ร†ยฎยฟรทร‡รยทรŽยฑร—ยทยกยนร–4ร€รฅ_รƒร–รยพ P a 02 r t Chapter 4 TCP Chapter 5 Chapter 6 UDP Chapter 7 Chapter 8 GUI C h a p t e r 04 TCP 1 3 1 2 3 TCP TCP TCP [ 4 2] listen connect send accept recv send recv [ 4 1] PC Internet Explorer HTTP HTTP

More information

Microsoft PowerPoint - 10_C_Language_Text_Files

Microsoft PowerPoint - 10_C_Language_Text_Files C Language ํŒŒ์ผ์ž…์ถœ๋ ฅ Doo-ok Seo clickseo@gmail.com http:// ๋ชฉ ์ฐจ ํŒŒ์ผ์ž…์ถœ๋ ฅ๊ฐœ๋… ํŒŒ์ผ์ž…์ถœ๋ ฅํ•จ์ˆ˜ ๊ธฐํƒ€ํŒŒ์ผ์ฒ˜๋ฆฌํ•จ์ˆ˜ 2 ํŒŒ์ผ์ž…์ถœ๋ ฅ๊ฐœ๋… ํŒŒ์ผ์ž…์ถœ๋ ฅ๊ฐœ๋… ํŒŒ์ผ์˜๊ธฐ๋ณธ๊ฐœ๋… ํŒŒ์ผ์‹œ์Šคํ…œ์˜๊ฐœ์š” FILE ๊ตฌ์กฐ์ฒด ํŒŒ์ผํ…Œ์ด๋ธ” ํŒŒ์ผ์—ด๊ธฐ๋ฐ๋‹ซ๊ธฐ : fopen, fclose ํ•จ์ˆ˜ ํŒŒ์ผ์ž…์ถœ๋ ฅํ•จ์ˆ˜ ๊ธฐํƒ€ํŒŒ์ผ์ฒ˜๋ฆฌํ•จ์ˆ˜ 3 ํŒŒ์ผ์˜๊ธฐ๋ณธ๊ฐœ๋… ํŒŒ์ผ์ž…์ถœ๋ ฅ๊ฐœ๋… ํ•˜๋‚˜์˜๋‹จ์œ„๋กœ์ทจ๊ธ‰ํ•ด์•ผํ•˜๋Š”๋ฐ์ดํ„ฐ๋“ค์˜์™ธ๋ถ€์ ์ปฌ๋ ‰์…˜์ด๋‹ค.

More information

PowerPoint ํ”„๋ ˆ์  ํ…Œ์ด์…˜

PowerPoint ํ”„๋ ˆ์  ํ…Œ์ด์…˜ ์˜คํ”ˆ์†Œ์Šค์†Œํ”„ํŠธ์›จ์–ด๊ฐœ๋ฐœ์ž…๋ฌธ (CP33992) ํŒŒ์ผ์ž…์ถœ๋ ฅ ๋ถ€์‚ฐ๋Œ€ํ•™๊ต๊ณต๊ณผ๋Œ€ํ•™์ •๋ณด์ปดํ“จํ„ฐ๊ณตํ•™๋ถ€ ํ•™์Šต๋ชฉํ‘œ ํŒŒ์ผ์˜๊ธฐ๋ณธ๊ฐœ๋…๊ณผํŠน์ง•์„์ดํ•ดํ• ์ˆ˜์žˆ๋‹ค. ํŒŒ์ผ์ฒ˜๋ฆฌ๊ณผ์ •์„์ดํ•ดํ• ์ˆ˜์žˆ๋‹ค. ํ˜•์‹์„์ง€์ •ํ•œํŒŒ์ผ์ž…์ถœ๋ ฅํ•จ์ˆ˜์˜์‚ฌ์šฉ๋ฒ•์„์•Œ์ˆ˜์žˆ๋‹ค. 2 ํŒŒ์ผ๊ณผํŒŒ์ผํฌ์ธํ„ฐ 3 ํŒŒ์ผ C ์˜ํŒŒ์ผ์€๋ชจ๋“ ๋ฐ์ดํ„ฐ๋ฅผ์—ฐ์†๋œ๋ฐ”์ดํŠธํ˜•ํƒœ๋กœ์ €์žฅํ•œ๋‹ค. 4 ํ…์ŠคํŠธํŒŒ์ผ (text file) C ์–ธ์–ด์˜ํŒŒ์ผ์ข…๋ฅ˜ ์‚ฌ๋žŒ๋“ค์ด์ฝ์„์ˆ˜์žˆ๋Š”๋ฌธ์ž๋“ค์„์ €์žฅํ•˜๊ณ ์žˆ๋Š”ํŒŒ์ผ

More information

http://cafedaumnet/pway Chapter 1 Chapter 2 21 printf("this is my first program\n"); printf("\n"); printf("-------------------------\n"); printf("this is my second program\n"); printf("-------------------------\n");

More information

PowerPoint Template

PowerPoint Template 13 ํŒŒ์ผ์ฒ˜๋ฆฌ 1 ํ•จ์ˆ˜ fopen() ํŒŒ์ผ์—ด๊ธฐ ํŒŒ์ผ์„๋งŒ๋“ค๊ธฐ์œ„ํ•ด์„œ๋Š”ํ•จ์ˆ˜ fopen() ์„์ด์šฉ ํ•จ์ˆ˜ fopen() ์˜ํ•จ์ˆ˜์›ํ˜•์€๋‹ค์Œ๊ณผ๊ฐ™์œผ๋ฉฐํ—ค๋”ํŒŒ์ผ stdio.h ํŒŒ์ผ์—์ •์˜ ํ•จ์ˆ˜ fopen() ์€๋‘๊ฐœ์˜๋ฌธ์ž์—ด์ „๋‹ฌ์ธ์ž๋ฅผ์ด์šฉ, ๋ฐ˜ํ™˜๊ฐ’์€ํฌ์ธํ„ฐ๊ฐ’์ธ FILE * 2 ํŒŒ์ผ์—ด๊ธฐ ์ธ์ž ํ•จ์ˆ˜ fopen() ์—์„œ ์ฒซ๋ฒˆ์งธ๋ฌธ์ž์—ด์€์ฒ˜๋ฆฌํ•˜๋ ค๋Š”ํŒŒ์ผ์ด๋ฆ„์ด๊ณ , ๋‘๋ฒˆ์งธ๋ฌธ์ž์—ด์€ํŒŒ์ผ์ฒ˜๋ฆฌ์ข…๋ฅ˜ ( ๋ชจ๋“œ )

More information

PowerPoint ํ”„๋ ˆ์  ํ…Œ์ด์…˜

PowerPoint ํ”„๋ ˆ์  ํ…Œ์ด์…˜ ํŒŒ์ผ์ž…์ถœ๋ ฅ Heeseung Jo ์ด์žฅ์˜๋‚ด์šฉ ํŒŒ์ผ๊ณผํŒŒ์ผํฌ์ธํ„ฐ ํŒŒ์ผ์ž…์ถœ๋ ฅํ•จ์ˆ˜ ์ž„์˜์ ‘๊ทผํŒŒ์ผ์ฒ˜๋ฆฌ 2 ํŒŒ์ผ๊ณผํŒŒ์ผํฌ์ธํ„ฐ ํŒŒ์ผ ํŒŒ์ผ์€๋ชจ๋“ ๋ฐ์ดํ„ฐ๋ฅผ์—ฐ์†๋œ๋ฐ”์ดํŠธํ˜•ํƒœ๋กœ์ €์žฅ 4 C ์–ธ์–ด์˜ํŒŒ์ผ์ข…๋ฅ˜ ํ…์ŠคํŠธํŒŒ์ผ (text file) ์‚ฌ๋žŒ๋“ค์ด์ฝ์„์ˆ˜์žˆ๋Š”๋ฌธ์ž๋“ค์„์ €์žฅํ•˜๊ณ ์žˆ๋Š”ํŒŒ์ผ ํ…์ŠคํŠธํŒŒ์ผ์—์„œ " ํ•œ์ค„์˜๋ " ์„๋‚˜ํƒ€๋‚ด๋Š”ํ‘œํ˜„์€ํŒŒ์ผ์ด์ฝ์–ด๋“ค์—ฌ์งˆ๋•Œ, C ๋‚ด๋ถ€์˜๋ฐฉ์‹์œผ๋กœ๋ณ€ํ™˜ ์˜ˆ, a.txt, main.c,

More information

Microsoft PowerPoint - Chap14_FileAccess.pptx

Microsoft PowerPoint - Chap14_FileAccess.pptx C ํ”„๋กœ๊ทธ๋ž˜๋ฐ๋ฐ์‹ค์Šต 14. ํŒŒ์ผ์ž…์ถœ๋ ฅ ์„ธ์ข…๋Œ€ํ•™๊ต ๋ชฉ์ฐจ 1) ํŒŒ์ผ์ž…์ถœ๋ ฅ๊ฐœ์š” 2) ํŒŒ์ผ์ž…์ถœ๋ ฅ์ ˆ์ฐจ 3) ํ…์ŠคํŠธํŒŒ์ผ vs. ์ด์ง„ํŒŒ์ผ 4) ํ…์ŠคํŠธํŒŒ์ผ์˜์ž…์ถœ๋ ฅํ•จ์ˆ˜ 5) ์ด์ง„ํŒŒ์ผ์˜์ž…์ถœ๋ ฅํ•จ์ˆ˜ ( ์‹ฌํ™”๋‚ด์šฉ ) 6) ๊ธฐํƒ€ํŒŒ์ผ์ž…์ถœ๋ ฅ๊ด€๋ จํ•จ์ˆ˜ ( ์‹ฌํ™”๋‚ด์šฉ ) 2 ํ‘œ์ค€์ž…์ถœ๋ ฅ 1) ํŒŒ์ผ์ž…์ถœ๋ ฅ๊ฐœ์š” ํ‘œ์ค€์ž…๋ ฅ์žฅ์น˜ ( ํ‚ค๋ณด๋“œ ) ๋ฅผํ†ตํ•ด์ž…๋ ฅ๋ฐ›์•„์ฒ˜๋ฆฌํ•˜์—ฌํ‘œ์ค€์ถœ๋ ฅ์žฅ์น˜ ( ๋ชจ๋‹ˆํ„ฐ ) ๋ฅผํ†ตํ•ด๊ฒฐ๊ณผ๋ฅผ๋ณด์—ฌ์ฃผ๋Š”๊ฒƒ

More information

PowerPoint ํ”„๋ ˆ์  ํ…Œ์ด์…˜

PowerPoint ํ”„๋ ˆ์  ํ…Œ์ด์…˜ Chapter 12 ํ‘œ์ค€์ž…์ถœ๋ ฅ๊ณผํŒŒ์ผ์ž…์ถœ๋ ฅ... 1. ํ‘œ์ค€์ž…์ถœ๋ ฅํ•จ์ˆ˜ 2. ํŒŒ์ผ์ž…์ถœ๋ ฅํ•จ์ˆ˜ 1. ํ‘œ์ค€์ž…์ถœ๋ ฅํ•จ์ˆ˜ ํ‘œ์ค€์ž…์ถœ๋ ฅํ•จ์ˆ˜ ํ‘œ์ค€์ž…๋ ฅ (stdin, Standard Input) : ํ‚ค๋ณด๋“œ์ž…๋ ฅ ํ‘œ์ค€์ถœ๋ ฅ (stdout, StandardOutput) : ๋ชจ๋‹ˆํ„ฐ์ถœ๋ ฅ 1. ํ‘œ์ค€์ž…์ถœ๋ ฅํ•จ์ˆ˜ ์„œ์‹ํ™”๋œ์ž…์ถœ๋ ฅํ•จ์ˆ˜ printf(), scanf() ์„œ์‹์˜์œ„์น˜์—์˜ฌ์ˆ˜์žˆ๋Š”๊ฒƒ๋“ค [ ๊ธฐ๋ณธ 11-1]

More information

์ œ1์žฅ Unix๋ž€ ๋ฌด์—‡์ธ๊ฐ€?

์ œ1์žฅ  Unix๋ž€ ๋ฌด์—‡์ธ๊ฐ€? 7 ์žฅ C ํ‘œ์ค€ํŒŒ์ผ์ž…์ถœ๋ ฅ ์ปดํ“จํ„ฐ๊ณผํ•™๊ณผ๋ฐ•ํ™˜์ˆ˜ 1 2 7.1 ํŒŒ์ผ๋ฐํŒŒ์ผํฌ์ธํ„ฐ ์‹œ์Šคํ…œํ˜ธ์ถœ๊ณผ C ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌํ•จ์ˆ˜ ์‹œ์Šคํ…œํ˜ธ์ถœ (System Calls) Unix ์ปค๋„์—์„œ๋น„์Šค์š”์ฒญํ•˜๋Š”ํ˜ธ์ถœ UNIX man์˜ Section 2์—์„ค๋ช…๋˜์–ด์žˆ์Œ C ํ•จ์ˆ˜์ฒ˜๋Ÿผํ˜ธ์ถœ๋ ์ˆ˜์žˆ์Œ. C ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌํ•จ์ˆ˜ (Library Functions) C ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌํ•จ์ˆ˜๋Š”๋ณดํ†ต์‹œ์Šคํ…œํ˜ธ์ถœ์„ํฌ์žฅํ•ด๋†“์€ํ•จ์ˆ˜ ๋ณดํ†ต๋‚ด๋ถ€์—์„œ์‹œ์Šคํ…œํ˜ธ์ถœ์„ํ•จ

More information

int main(void) int a; int b; a=3; b=a+5; printf("a : %d \n", a); printf("b : %d \n", b); a b 3 a a+5 b &a(12ff60) &b(12ff54) 3 a 8 b printf(" a : %x \

int main(void) int a; int b; a=3; b=a+5; printf(a : %d \n, a); printf(b : %d \n, b); a b 3 a a+5 b &a(12ff60) &b(12ff54) 3 a 8 b printf( a : %x \ ? 1 int main(void) int a; int b; a=3; b=a+5; printf("a : %d \n", a); printf("b : %d \n", b); a b 3 a a+5 b &a(12ff60) &b(12ff54) 3 a 8 b printf(" a : %x \n", &a); printf(" b : %x \n", &b); * : 12ff60,

More information

Microsoft PowerPoint - Lesson13.pptx

Microsoft PowerPoint - Lesson13.pptx 2008 Spring Computer Engineering g Programming g 1 Lesson 13 - ์ œ 16 ์žฅํŒŒ์ผ์ž…์ถœ๋ ฅ Lecturer: JUNBEOM YOO jbyoo@konkuk.ac.kr ๋ณธ๊ฐ•์˜์ž๋ฃŒ๋Š”์ƒ๋Šฅ์ถœํŒ์‚ฌ์˜ PPT ๊ฐ•์˜์ž๋ฃŒ ๋ฅผ๊ธฐ๋ฐ˜์œผ๋กœ์ œ์ž‘๋˜์—ˆ์Šต๋‹ˆ๋‹ค. ์ด๋ฒˆ์žฅ์—์„œํ•™์Šตํ• ๋‚ด์šฉ ํŒŒ์ผ์˜๊ธฐ์ดˆ ํ…์ŠคํŠธํŒŒ์ผ์ฝ๊ธฐ์™€์“ฐ๊ธฐ ์ด์ง„ํŒŒ์ผ์ฝ๊ธฐ์™€์“ฐ๊ธฐ ์ž„์˜์ ‘๊ทผํŒŒ์ผ ํŒŒ์ผ์„์ด์šฉํ•˜๋ฉด๋ณด๋‹ค๋งŽ์€๋ฐ์ดํ„ฐ๋ฅผ์œ ์šฉํ•˜๊ณ ์ง€์†์ ์œผ๋กœ์‚ฌ์šฉ๋ฐ๊ด€๋ฆฌํ• ์ˆ˜์žˆ์Šต๋‹ˆ๋‹ค.

More information

Microsoft PowerPoint APUE(Intro).ppt

Microsoft PowerPoint APUE(Intro).ppt ์ปดํ“จํ„ฐํŠน๊ฐ• () [Ch. 1 & Ch. 2] 2006 ๋…„๋ด„ํ•™๊ธฐ ๋ฌธ์–‘์„ธ๊ฐ•์›๋Œ€ํ•™๊ต์ปดํ“จํ„ฐ๊ณผํ•™๊ณผ APUE ๊ฐ•์˜๋ชฉ์  UNIX ์‹œ์Šคํ…œํ”„๋กœ๊ทธ๋ž˜๋ฐ file, process, signal, network programming UNIX ์‹œ์Šคํ…œ์˜์ฒด๊ณ„์ ์ดํ•ด ์‹œ์Šคํ…œํ”„๋กœ๊ทธ๋ž˜๋ฐ๋Šฅ๋ ฅํ–ฅ์ƒ Page 2 1 APUE ๊ฐ•์˜๋™๊ธฐ UNIX ๋Š”์ธ๊ธฐ์žˆ๋Š”์šด์˜์ฒด์ œ ์„œ๋ฒ„์‹œ์Šคํ…œ ( ์›น์„œ๋ฒ„, ๋ฐ์ดํ„ฐ๋ฒ ์ด์Šค์„œ๋ฒ„

More information

BMP ํŒŒ์ผ ์ฒ˜๋ฆฌ

BMP ํŒŒ์ผ ์ฒ˜๋ฆฌ BMP ํŒŒ์ผ์ฒ˜๋ฆฌ ๊น€์„ฑ์˜๊ต์ˆ˜ ๊ธˆ์˜ค๊ณต๊ณผ๋Œ€ํ•™๊ต ์ปดํ“จํ„ฐ๊ณตํ•™๊ณผ ํ•™์Šต๋‚ด์šฉ ์˜์ƒ๋ฐ˜์ „ํ”„๋กœ๊ทธ๋žจ์ œ์ž‘ 2 Inverting images out = 255 - in 3 /* ์ดํ”„๋กœ๊ทธ๋žจ์€ 8bit gray-scale ์˜์ƒ์„์ž…๋ ฅ์œผ๋กœ์‚ฌ์šฉํ•˜์—ฌ๋ฐ˜์ „ํ•œํ›„๋™์ผํฌ๋งท์˜์˜์ƒ์œผ๋กœ์ €์žฅํ•œ๋‹ค. */ #include #include #define WIDTHBYTES(bytes)

More information

chap8.PDF

chap8.PDF 8 Hello!! C 2 3 4 struct - {...... }; struct jum{ int x_axis; int y_axis; }; struct - {...... } - ; struct jum{ int x_axis; int y_axis; }point1, *point2; 5 struct {....... } - ; struct{ int x_axis; int

More information

ABC 11์žฅ

ABC 11์žฅ 12 ์žฅ์ž…๋ ฅ๊ณผ์ถœ๋ ฅ getchar()/putchar() printf()/scanf() sprintf()/sscanf() ํŒŒ์ผ์ž…์ถœ๋ ฅ fprintf()/fscanf() ํŒŒ์ผ์˜์ž„์˜์˜์œ„์น˜์ ‘๊ทผ ๋‚ด์šฉ ftell(), fseek(), rewind() ํ…์ŠคํŠธํŒŒ์ผ ์ด์ง„ํŒŒ์ผ fread()/fwrite() 1 getchar()/putchar() ํ•จ์ˆ˜์›ํ˜• int getchar(void);

More information

11์žฅ ํฌ์ธํ„ฐ

11์žฅ ํฌ์ธํ„ฐ ๋ˆ„๊ตฌ๋‚˜์ฆ๊ธฐ๋Š” C ์–ธ์–ด์ฝ˜์„œํŠธ ์ œ 12 ์žฅํ‘œ์ค€์ž…์ถœ๋ ฅ๊ณผํŒŒ์ผ์ž…์ถœ๋ ฅ ์ด๋ฒˆ์žฅ์—์„œํ•™์Šตํ• ๋‚ด์šฉ ์ŠคํŠธ๋ฆฝ์˜๊ฐœ๋… ํ‘œ์ค€์ž…์ถœ๋ ฅ ํŒŒ์ผ์ž…์ถœ๋ ฅ ์ž…์ถœ๋ ฅ๊ด€๋ จํ•จ์ˆ˜ ์ž…์ถœ๋ ฅ์—๊ด€๋ จ๋œ๊ฐœ๋…๋“ค๊ณผํ•จ์ˆ˜๋“ค์—๋Œ€ํ•˜์—ฌํ•™์Šตํ•œ๋‹ค. ์ŠคํŠธ๋ฆผ์˜๊ฐœ๋… ์ŠคํŠธ๋ฆผ (stream): ์ž…๋ ฅ๊ณผ์ถœ๋ ฅ์„๋ฐ”์ดํŠธ (byte) ๋“ค์˜ํ๋ฆ„์œผ๋กœ์ƒ๊ฐํ•˜๋Š”๊ฒƒ ์ŠคํŠธ๋ฆผ๊ณผํŒŒ์ผ ์ŠคํŠธ๋ฆผ์€๊ตฌ์ฒด์ ์œผ๋กœ FILE ๊ตฌ์กฐ์ฒด๋ฅผํ†ตํ•˜์—ฌ๊ตฌํ˜„ FILE ์€ stdio.h ์—์ •์˜๋˜์–ด์žˆ๋‹ค.

More information

K&R2 Reference Manual ๋ฒˆ์—ญ๋ณธ

K&R2 Reference Manual ๋ฒˆ์—ญ๋ณธ typewriter structunion struct union if-else if if else if if else if if if if else else ; auto register static extern typedef void char short int long float double signed unsigned const volatile { } struct

More information

Microsoft PowerPoint - chap11.ppt [ํ˜ธํ™˜ ๋ชจ๋“œ]

Microsoft PowerPoint - chap11.ppt [ํ˜ธํ™˜ ๋ชจ๋“œ] 2010-1 ํ•™๊ธฐํ”„๋กœ๊ทธ๋ž˜๋ฐ์ž…๋ฌธ (1) 11 ์žฅ์ž…์ถœ๋ ฅ๊ณผ์šด์˜์ฒด์ œ ๋ฐ•์ข…ํ˜ Tel: 970-6702 Email: jhpark1@snut.ac.kr k 0 ํŠน์ง• printf() - ์ž„์˜์˜๊ฐœ์ˆ˜์˜์ธ์ž์ถœ๋ ฅ - ๊ฐ„๋‹จํ•œ๋ณ€ํ™˜๋ช…์„ธ๋‚˜ํ˜•์‹์„์‚ฌ์šฉํ•œ์ถœ๋ ฅ์ œ์–ด A Book on C, 4ed. 11-1 printf() printf(control_string, other_argument) -

More information

0. ํ‘œ์ง€์—์ด๋ฆ„๊ณผํ•™๋ฒˆ์„์ ์œผ์‹œ์˜ค. (6) 1. ๋ณ€์ˆ˜ x, y ๊ฐ€ integer type ์ด๋ผ๊ฐ€์ •ํ•˜๊ณ ๋‹ค์Œ๋นˆ์นธ์— x ์™€ y ์˜๊ณ„์‚ฐ๊ฒฐ๊ณผ๊ฐ’์„์ ์œผ์‹œ์˜ค. (5) x = (3 + 7) * 6; x = 60 x = (12 + 6) / 2 * 3; x = 27 x = 3 * (8 / 4

0. ํ‘œ์ง€์—์ด๋ฆ„๊ณผํ•™๋ฒˆ์„์ ์œผ์‹œ์˜ค. (6) 1. ๋ณ€์ˆ˜ x, y ๊ฐ€ integer type ์ด๋ผ๊ฐ€์ •ํ•˜๊ณ ๋‹ค์Œ๋นˆ์นธ์— x ์™€ y ์˜๊ณ„์‚ฐ๊ฒฐ๊ณผ๊ฐ’์„์ ์œผ์‹œ์˜ค. (5) x = (3 + 7) * 6; x = 60 x = (12 + 6) / 2 * 3; x = 27 x = 3 * (8 / 4 Introduction to software design 2012-1 Final 2012.06.13 16:00-18:00 Student ID: Name: - 1 - 0. ํ‘œ์ง€์—์ด๋ฆ„๊ณผํ•™๋ฒˆ์„์ ์œผ์‹œ์˜ค. (6) 1. ๋ณ€์ˆ˜ x, y ๊ฐ€ integer type ์ด๋ผ๊ฐ€์ •ํ•˜๊ณ ๋‹ค์Œ๋นˆ์นธ์— x ์™€ y ์˜๊ณ„์‚ฐ๊ฒฐ๊ณผ๊ฐ’์„์ ์œผ์‹œ์˜ค. (5) x = (3 + 7) * 6; x = 60 x

More information

C ์–ธ์–ด ํ”„๋กœ๊ทธ๋ž˜๋ฐŠ ๊ณผ์ œ ํ’€์ด

C ์–ธ์–ด ํ”„๋กœ๊ทธ๋ž˜๋ฐŠ ๊ณผ์ œ ํ’€์ด ๊ณผ์ œํ’€์ด (1) ํ™€์ˆ˜ / ์ง์ˆ˜ํŒ์ • (1) /* 20094123 ํ™๊ธธ๋™ 20100324 */ /* even_or_odd.c */ /* ์ •์ˆ˜๋ฅผ์ž…๋ ฅ๋ฐ›์•„ํ™€์ˆ˜์ธ์ง€์ง์ˆ˜์ธ์ง€ํŒ์ •ํ•˜๋Š”ํ”„๋กœ๊ทธ๋žจ */ int number; printf(" ์ •์ˆ˜๋ฅผ์ž…๋ ฅํ•˜์‹œ์˜ค => "); scanf("%d", &number); ํ™•์ธ ์ฃผ์„๋ฌธ ๊ฐ€ํ•„์š”ํ•œ์ด์œ  printf ์™€ scanf ์Œ

More information

Microsoft PowerPoint - chap11-1.ppt [ํ˜ธํ™˜ ๋ชจ๋“œ]

Microsoft PowerPoint - chap11-1.ppt [ํ˜ธํ™˜ ๋ชจ๋“œ] chapter 11-1 ์ฐธ๊ณ ์ž๋ฃŒ. ํŒŒ์ผ์ž…์ถœ๋ ฅ ๋ฐ•์ข…ํ˜ Tel: 970-6702 Email: jhpark1@snut.ac.kr k ํ•œ๋น›๋ฏธ๋””์–ด ์ถœ์ฒ˜ : ๋‡Œ๋ฅผ์ž๊ทนํ•˜๋Š” Cํ”„๋กœ๊ทธ๋ž˜๋ฐ, ํ•œ๋น›๋ฏธ๋””์–ด -1- ehanbit.net ํŒŒ์ผ์ž…์ถœ๋ ฅ์˜๊ฐœ๋… ํŒŒ์ผ์€๋ฐ์ดํ„ฐ๋ฅผ์ž…์ถœ๋ ฅํ•˜๋Š”๋ชจ๋“ ๋Œ€์ƒ์„์˜๋ฏธํ•œ๋‹ค. - ํ‚ค๋ณด๋“œ๋กœ๋ถ€ํ„ฐ๋ฐ์ดํ„ฐ๋ฅผ์ž…๋ ฅํ•˜๊ณ ๋ชจ๋‹ˆํ„ฐ๋กœ์ถœ๋ ฅํ•˜๋Š”๊ฒƒ์€ํ‚ค๋ณด๋“œํŒŒ์ผ๊ณผ ๋ชจ๋‹ˆํ„ฐํŒŒ์ผ๋กœ๋ฐ์ดํ„ฐ๋ฅผ์ž…์ถœ๋ ฅํ•˜๋Š”๊ฒƒ์ด๋‹ค.

More information

Computer Programming (2008 Fall)

Computer Programming  (2008 Fall) Computer Programming Practice (2011 Winter) Practice 12 Standard C Libraries The Last Practice 2012. 01. 25 2/24 Contents Standard C Libraries Input & Output Functions : stdio.h String Functions : string.h

More information

C ํ”„๋กœ๊ทธ๋ž˜๋ฐ ์–ธ์–ด ์ž…๋ฌธ C ํ”„๋กœ๊ทธ๋ž˜๋ฐ ์–ธ์–ด ์ž…๋ฌธ ๊น€๋ช…ํ˜ธ์ € ์ˆญ์‹ค๋Œ€ํ•™๊ต ์ถœํŒ๊ตญ ๋จธ๋ฆฌ๋ง..... C, C++, Java, Fortran, Python, Ruby,.. C. C 1972. 40 C.. C. 1999 C99. C99. C. C. C., kmh ssu.ac.kr.. ,. 2013 12 Contents 1์žฅ ํ”„๋กœ๊ทธ๋ž˜๋ฐ ์‹œ์ž‘ 1.1 C 10 1.2 12

More information

์Šฌ๋ผ์ด๋“œ 1

์Šฌ๋ผ์ด๋“œ 1 10 ์žฅ์ž…์ถœ๋ ฅํ•จ์ˆ˜ ๋ฐ•์ข…ํ˜๊ต์ˆ˜ UCS Lab Tel: 970-6702 Email: jhpark1@seoultech.ac.kr SeoulTech 2017-1 st ํ”„๋กœ๊ทธ๋ž˜๋ฐ์ž…๋ฌธ (1) 2 printf() ํŠน์ง• ์ž„์˜์˜๊ฐœ์ˆ˜์˜์ธ์ž์ถœ๋ ฅ ๊ฐ„๋‹จํ•œ๋ณ€ํ™˜๋ช…์„ธ๋‚˜ํ˜•์‹์„์‚ฌ์šฉํ•œ์ถœ๋ ฅ์ œ์–ด 3 printf() printf(control_string, other_argument) ์˜ˆ printf("she

More information

61 62 63 64 234 235 p r i n t f ( % 5 d :, i+1); g e t s ( s t u d e n t _ n a m e [ i ] ) ; if (student_name[i][0] == \ 0 ) i = MAX; p r i n t f (\ n :\ n ); 6 1 for (i = 0; student_name[i][0]!= \ 0&&

More information

13์ฃผ-14์ฃผproc.PDF

13์ฃผ-14์ฃผproc.PDF 12 : Pro*C/C++ 1 2 Embeded SQL 3 PRO *C 31 C/C++ PRO *C NOT! NOT AND && AND OR OR EQUAL == = SQL,,, Embeded SQL SQL 32 Pro*C C SQL Pro*C C, C Pro*C, C C 321, C char : char[n] : n int, short, long : float

More information

์ค‘๊ฐ„๊ณ ์‚ฌ

์ค‘๊ฐ„๊ณ ์‚ฌ ์ค‘๊ฐ„๊ณ ์‚ฌ ์˜ˆ์ œ 1 ์‚ฌ์šฉ์ž๋กœ๋ถ€ํ„ฐ๋ฐ›์€๋‘๊ฐœ์˜์ˆซ์ž x, y ์ค‘์—์„œํฐ์ˆ˜๋ฅผ์ฐพ๋Š”์•Œ๊ณ ๋ฆฌ์ฆ˜์„์˜์‚ฌ์ฝ”๋“œ๋กœ์ž‘์„ฑํ•˜์‹œ์˜ค. Step 1: Input x, y Step 2: if (x > y) then MAX

More information

untitled

untitled int i = 10; char c = 69; float f = 12.3; int i = 10; char c = 69; float f = 12.3; printf("i : %u\n", &i); // i printf("c : %u\n", &c); // c printf("f : %u\n", &f); // f return 0; i : 1245024 c : 1245015

More information

์—ฐ์Šต๋ฌธ์ œ๋งŒ-์ˆ˜์ •

์—ฐ์Šต๋ฌธ์ œ๋งŒ-์ˆ˜์ • 10 Call by Value Call by Reference Call by Result Call by Name C call by value void int X int hap(int x, int y, int z, int w); printf("%d\n", hap(3, 4, 5, 6)); int hap(int x, int y, int z, int w) return

More information

์Šฌ๋ผ์ด๋“œ 1

์Šฌ๋ผ์ด๋“œ 1 / ์œ ๋‹‰์Šค์‹œ์Šคํ…œ๊ฐœ์š” / ํŒŒ์ผ / ํ”„๋กœ์„ธ์Šค 01 File Descriptor file file descriptor file type unix ์—์„œ์˜ํŒŒ์ผ์€๋‹จ์ง€๋ฐ”์ดํŠธ๋“ค์˜๋‚˜์—ด์ž„ operating system ์€ํŒŒ์ผ์—์–ด๋–คํฌ๋งท๋„๋ถ€๊ณผํ•˜์ง€์•Š์Œ ํŒŒ์ผ์˜๋‚ด์šฉ์€๋ฐ”์ดํŠธ๋‹จ์œ„๋กœ์ฃผ์†Œ๋ฅผ์ค„์ˆ˜์žˆ์Œ file descriptor ๋Š” 0 ์ด๋‚˜์–‘์ˆ˜์ž„ file ์€ open ์ด๋‚˜ creat ๋กœ file

More information

106 107, ( ),, ( ), 3, int kor[5]; int eng[5]; int Microsoft Windows 4 (ANSI C2 ) int kor[5] 20 # define #define SIZE 20 int a[10]; char c[10]; float

106 107, ( ),, ( ), 3, int kor[5]; int eng[5]; int Microsoft Windows 4 (ANSI C2 ) int kor[5] 20 # define #define SIZE 20 int a[10]; char c[10]; float Part 2 31 32 33 106 107, ( ),, ( ), 3, int kor[5]; int eng[5]; int Microsoft Windows 4 (ANSI C2 ) int kor[5] 20 # define #define SIZE 20 int a[10]; char c[10]; float f[size]; /* 10 /* c 10 /* f 20 3 1

More information

<443A5C4C C4B48555C B3E25C32C7D0B1E25CBCB3B0E8C7C1B7CEC1A7C6AE425CBED0C3E0C7C1B7CEB1D7B7A55C D616E2E637070>

<443A5C4C C4B48555C B3E25C32C7D0B1E25CBCB3B0E8C7C1B7CEC1A7C6AE425CBED0C3E0C7C1B7CEB1D7B7A55C D616E2E637070> #include "stdafx.h" #include "Huffman.h" 1 /* ๋น„ํŠธ์˜๋ถ€๋ถ„์„๋ฝ‘์•„๋‚ด๋Š”ํ•จ์ˆ˜ */ unsigned HF::bits(unsigned x, int k, int j) return (x >> k) & ~(~0

More information

13 ์ฃผ์ฐจ๋ฌธ์ž์—ด์˜ํ‘œํ˜„๊ณผ์ž…์ถœ๋ ฅ

13 ์ฃผ์ฐจ๋ฌธ์ž์—ด์˜ํ‘œํ˜„๊ณผ์ž…์ถœ๋ ฅ 13 ์ฃผ์ฐจ๋ฌธ์ž์—ด์˜ํ‘œํ˜„๊ณผ์ž…์ถœ๋ ฅ ๋ฌธ์žํ‘œํ˜„๋ฐฉ๋ฒ• ๋ฌธ์ž์—ดํ‘œํ˜„๋ฐฉ๋ฒ• ๋ฌธ์ž์—ด์ด๋ž€๋ฌด์—‡์ธ๊ฐ€? ๋ฌธ์ž์—ด์˜์ž…์ถœ๋ ฅ ๋ฌธ์ž์ฒ˜๋ฆฌ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌํ•จ์ˆ˜ ํ‘œ์ค€์ž…์ถœ๋ ฅ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌํ•จ์ˆ˜ C ์–ธ์–ด๋ฅผ์ด์šฉํ•˜์—ฌ๋ฌธ์ž์—ด์„์ฒ˜๋ฆฌํ•˜๊ธฐ์œ„ํ•ด์„œ๋Š”๋ฌธ์žํ˜•์˜๋ฐฐ์—ด์ด๋‚˜ํฌ์ธํ„ฐ๋ฅผ์‚ฌ์šฉํ•˜๊ฒŒ๋œ๋‹ค. ๋ฌธ์ž์—ด์„์ฒ˜๋ฆฌํ•˜๋Š”๋™์ž‘์œผ๋กœ๋Š”๋‹จ์ˆœํ•˜๊ฒŒ๋ฌธ์ž์—ด์˜์ž…๋ ฅ์ด๋‚˜์ถœ๋ ฅ๊ธฐ๋Šฅ์ด์™ธ์—๋„๋ฌธ์ž์—ด์˜๋ณต์‚ฌ๋‚˜์น˜ํ™˜, ๋ฌธ์ž์—ด์˜๊ธธ์ด๋ฅผ๊ตฌํ•˜๊ฑฐ๋‚˜๋ฌธ์ž์—ด์„๋น„๊ตํ•˜๋Š”๊ธฐ๋Šฅ๋“ฑ๋งŽ์€๊ธฐ๋Šฅ์„ํ•„์š”๋กœํ•œ๋‹ค. ๊ทธ๋Ÿฌ๋‚˜์ด๋Ÿฌํ•œ๊ธฐ๋Šฅ๋“ค์„๋ชจ๋‘๊ตฌํ˜„ํ•˜๊ธฐ๋ž€๋งค์šฐ๊นŒ๋‹ค๋กœ์šฐ๋ฉฐ,

More information

๋ณธ ๊ฐ•์˜์— ๋“ค์–ด๊ฐ€๊ธฐ ์ „

๋ณธ ๊ฐ•์˜์— ๋“ค์–ด๊ฐ€๊ธฐ ์ „ C ๊ธฐ์ดˆํŠน๊ฐ• ์ข…ํ•ฉ๊ณผ์ œ ๊ณผ์ œ๋‚ด์šฉ ๊ตฌ์กฐ์ฒด๋ฅผ์ด์šฉํ•˜์—ฌ๊ต๊ณผ๋ชฉ์ด๋ฆ„๊ณผ์ฝ”๋“œ๋ฅผํŒŒ์ผ๋กœ๋ถ€ํ„ฐ์ž…๋ ฅ๋ฐ›์•„๊ด€๋ฆฌ ๊ตฌ์กฐ์ฒด๋ฅผ์ด์šฉํ•˜์—ฌํ•™์ƒ๋“ค์˜์ด๋ฆ„, ํ•™๋ฒˆ๊ณผ์ด์ˆ˜ํ•œ๊ต๊ณผ๋ชฉ์˜์ฝ”๋“œ์™€์ ์ˆ˜๋ฅผํŒŒ์ผ๋กœ๋ถ€ํ„ฐ์ž…๋ ฅ ํ•™์ƒ๊ฐœ์ธ๋ณ„์ด์ , ํ‰๊ท ๊ณ„์‚ฐ ๊ต๊ณผ๋ชฉ๋ณ„์ด์ˆ˜ํ•™์ƒ์ˆ˜, ์ด์ ๋ฐํ‰๊ท ์„๊ณ„์‚ฐ ๊ฒฐ๊ณผ๋ฅผํŒŒ์ผ์—์ €์žฅํ•˜๋Š”ํ”„๋กœ๊ทธ๋žจ์„์ž‘์„ฑ 2 Makefile OBJS = score_main.o score_input.o score_calc.o score_print.o

More information

< E20C6DFBFFEBEEE20C0DBBCBAC0BB20C0A7C7D12043BEF0BEEE20492E707074>

< E20C6DFBFFEBEEE20C0DBBCBAC0BB20C0A7C7D12043BEF0BEEE20492E707074> Chap #2 ํŽŒ์›จ์–ด์ž‘์„ฑ์„์œ„ํ•œ C ์–ธ์–ด I http://www.smartdisplay.co.kr ๊ฐ•์˜๊ณ„ํš Chap1. ๊ฐ•์˜๊ณ„ํš๋ฐ๋””์ง€ํ„ธ๋…ผ๋ฆฌ์ด๋ก  Chap2. ํŽŒ์›จ์–ด์ž‘์„ฑ์„์œ„ํ•œ C ์–ธ์–ด I Chap3. ํŽŒ์›จ์–ด์ž‘์„ฑ์„์œ„ํ•œ C ์–ธ์–ด II Chap4. AT89S52 ๋ฉ”๋ชจ๋ฆฌ๊ตฌ์กฐ Chap5. SD-52 ๋ณด๋“œ๊ตฌ์„ฑ๊ณผ์ฝ”๋“œ๋ฉ”๋ชจ๋ฆฌํ”„๋กœ๊ทธ๋ž˜๋ฐ๋ฐฉ๋ฒ• Chap6. ์–ด๋“œ๋ ˆ์Šค๋””์ฝ”๋”ฉ ( ๋งคํ•‘ ) ๊ณผ์–ด์…ˆ๋ธ”๋ฆฌ์–ด์ฝ”๋”ฉ๋ฐฉ๋ฒ•

More information

11์žฅ ํฌ์ธํ„ฐ

11์žฅ ํฌ์ธํ„ฐ ์‰ฝ๊ฒŒํ’€์–ด์“ด C ์–ธ์–ด Express ์ œ 12 ์žฅ๋ฌธ์ž์™€๋ฌธ์ž์—ด ์ด๋ฒˆ์žฅ์—์„œํ•™์Šตํ• ๋‚ด์šฉ ๋ฌธ์žํ‘œํ˜„๋ฐฉ๋ฒ• ๋ฌธ์ž์—ดํ‘œํ˜„๋ฐฉ๋ฒ• ๋ฌธ์ž์—ด์ด๋ž€๋ฌด์—‡์ธ๊ฐ€? ๋ฌธ์ž์—ด์˜์ž…์ถœ๋ ฅ ๋ฌธ์ž์ฒ˜๋ฆฌ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌํ•จ์ˆ˜ ํ‘œ์ค€์ž…์ถœ๋ ฅ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌํ•จ์ˆ˜ ์ธ๊ฐ„์€๋ฌธ์ž๋ฅผ์‚ฌ์šฉํ•˜์—ฌ์ •๋ณด๋ฅผํ‘œํ˜„ํ•˜๋ฏ€๋กœ๋ฌธ์ž์—ด์€ํ”„๋กœ๊ทธ๋žจ์—์„œ์ค‘์š”ํ•œ์œ„์น˜๋ฅผ์ฐจ์ง€ํ•˜๊ณ ์žˆ๋‹ค. ์ด๋ฒˆ์žฅ์—์„œ๋Š” C ์—์„œ์˜๋ฌธ์ž์—ด์ฒ˜๋ฆฌ๋ฐฉ๋ฒ•์—๋Œ€ํ•˜์—ฌ์ž์„ธํžˆ์‚ดํŽด๋ณผ๊ฒƒ์ด๋‹ค. ๋ฌธ์ž์˜์ค‘์š”์„ฑ ์ธ๊ฐ„ํ•œํ…Œํ…์ŠคํŠธ๋Š”๋Œ€๋‹จํžˆ์ค‘์š”ํ•˜๋‹ค.

More information

๊ธˆ์˜ค๊ณต๋Œ€ ์ปดํ“จํ„ฐ๊ณตํ•™์ „๊ณต ๊ฐ•์˜์ž๋ฃŒ

๊ธˆ์˜ค๊ณต๋Œ€ ์ปดํ“จํ„ฐ๊ณตํ•™์ „๊ณต ๊ฐ•์˜์ž๋ฃŒ C ํ”„๋กœ๊ทธ๋ž˜๋ฐํ”„๋กœ์ ํŠธ Chap 14. ํฌ์ธํ„ฐ์™€ํ•จ์ˆ˜์—๋Œ€ํ•œ์ดํ•ด 2013.10.09. ์˜ค๋ณ‘์šฐ ์ปดํ“จํ„ฐ๊ณตํ•™๊ณผ 14-1 ํ•จ์ˆ˜์˜์ธ์ž๋กœ๋ฐฐ์—ด์ „๋‹ฌ ๊ธฐ๋ณธ์ ์ธ์ธ์ž์˜์ „๋‹ฌ๋ฐฉ์‹ ๊ฐ’์˜๋ณต์‚ฌ์—์˜ํ•œ์ „๋‹ฌ val 10 a 10 11 Department of Computer Engineering 2 14-1 ํ•จ์ˆ˜์˜์ธ์ž๋กœ๋ฐฐ์—ด์ „๋‹ฌ ๋ฐฐ์—ด์˜ํ•จ์ˆ˜์ธ์ž์ „๋‹ฌ๋ฐฉ์‹ ๋ฐฐ์—ด์ด๋ฆ„ ( ๋ฐฐ์—ด์ฃผ์†Œ, ํฌ์ธํ„ฐ ) ์—์˜ํ•œ์ „๋‹ฌ #include

More information

03แ„Œแ…กแ†ผ.แ„‰แ…ณแ„แ…ขแ†จ.key

03แ„Œแ…กแ†ผ.แ„‰แ…ณแ„แ…ขแ†จ.key ---------------- DATA STRUCTURES USING C ---------------- 03CHAPTER 1 ? (stack): (LIFO:Last-In First-Out) 2 : top : ( index -1 ),,, 3 : ( ) ( ) -> ->. ->.... 4 Stack ADT : (LIFO) : init():. is_empty():

More information

ํ”„๋กœ๊ทธ๋žจ์„ ํ•™๊ต ๋“ฑ์ง€์—์„œ ์กฐ๊ธˆ์ด๋ผ๋„ ๋ฐฐ์šด ์‚ฌ๋žŒ๋“ค์„ ์œ„ํ•œ ํ”„๋กœ๊ทธ๋ž˜๋ฐ ๋…ธํŠธ ์ž…๋‹ˆ๋‹ค. ์ € ์—ญ์‹œ ๊ทธ ์‚ฌ๋žŒ๋“ค ์ค‘ ํ•˜๋‚˜ ์ž…๋‹ˆ๋‹ค. ์ค‘๊ณ ๋“ฑํ•™๊ต ์‹œ์ ˆ ํ•™๊ต ๋„์„œ๊ด€, ์ƒˆ๋กœ ์ƒ๊ธด ์‹œ๋ฆฝ ๋„์„œ๊ด€ ๋“ฑ์„ ๋‹ค๋‹ˆ๋ฉฐ ์ฑ…์„ ๋ณด ๊ณ  ์ •๋ฆฌํ•˜๋ฉฐ ์–ด๋Š์ •๋„ ๋…ํ•™์œผ๋ฅด ๊ณต๋ถ€ํ•˜๊ธด ํ–ˆ์ง€๋งŒ, ์ž์ฃผ ์•ˆํ•˜๋‹ค ๋ณด๋ฉด ๊ธˆ๋ฐฉ ์žŠ์–ด

ํ”„๋กœ๊ทธ๋žจ์„ ํ•™๊ต ๋“ฑ์ง€์—์„œ ์กฐ๊ธˆ์ด๋ผ๋„ ๋ฐฐ์šด ์‚ฌ๋žŒ๋“ค์„ ์œ„ํ•œ ํ”„๋กœ๊ทธ๋ž˜๋ฐ ๋…ธํŠธ ์ž…๋‹ˆ๋‹ค. ์ € ์—ญ์‹œ ๊ทธ ์‚ฌ๋žŒ๋“ค ์ค‘ ํ•˜๋‚˜ ์ž…๋‹ˆ๋‹ค. ์ค‘๊ณ ๋“ฑํ•™๊ต ์‹œ์ ˆ ํ•™๊ต ๋„์„œ๊ด€, ์ƒˆ๋กœ ์ƒ๊ธด ์‹œ๋ฆฝ ๋„์„œ๊ด€ ๋“ฑ์„ ๋‹ค๋‹ˆ๋ฉฐ ์ฑ…์„ ๋ณด ๊ณ  ์ •๋ฆฌํ•˜๋ฉฐ ์–ด๋Š์ •๋„ ๋…ํ•™์œผ๋ฅด ๊ณต๋ถ€ํ•˜๊ธด ํ–ˆ์ง€๋งŒ, ์ž์ฃผ ์•ˆํ•˜๋‹ค ๋ณด๋ฉด ๊ธˆ๋ฐฉ ์žŠ์–ด ๊ฐœ๋‚˜๋ฆฌ ์—ฐ๊ตฌ์†Œ C ์–ธ์–ด ๋…ธํŠธ (tyback.egloos.com) ํ”„๋กœ๊ทธ๋žจ์„ ํ•™๊ต ๋“ฑ์ง€์—์„œ ์กฐ๊ธˆ์ด๋ผ๋„ ๋ฐฐ์šด ์‚ฌ๋žŒ๋“ค์„ ์œ„ํ•œ ํ”„๋กœ๊ทธ๋ž˜๋ฐ ๋…ธํŠธ ์ž…๋‹ˆ๋‹ค. ์ € ์—ญ์‹œ ๊ทธ ์‚ฌ๋žŒ๋“ค ์ค‘ ํ•˜๋‚˜ ์ž…๋‹ˆ๋‹ค. ์ค‘๊ณ ๋“ฑํ•™๊ต ์‹œ์ ˆ ํ•™๊ต ๋„์„œ๊ด€, ์ƒˆ๋กœ ์ƒ๊ธด ์‹œ๋ฆฝ ๋„์„œ๊ด€ ๋“ฑ์„ ๋‹ค๋‹ˆ๋ฉฐ ์ฑ…์„ ๋ณด ๊ณ  ์ •๋ฆฌํ•˜๋ฉฐ ์–ด๋Š์ •๋„ ๋…ํ•™์œผ๋ฅด ๊ณต๋ถ€ํ•˜๊ธด ํ–ˆ์ง€๋งŒ, ์ž์ฃผ ์•ˆํ•˜๋‹ค ๋ณด๋ฉด ๊ธˆ๋ฐฉ ์žŠ์–ด๋จน๊ณ  ํ•˜๋”๋ผ๊ตฌ์š”. ๊ทธ๋ž˜์„œ,

More information

๋ณธ ๊ฐ•์˜์— ๋“ค์–ด๊ฐ€๊ธฐ ์ „

๋ณธ ๊ฐ•์˜์— ๋“ค์–ด๊ฐ€๊ธฐ ์ „ C ๊ธฐ์ดˆํŠน๊ฐ• ํ‘œ์ค€์ž…์ถœ๋ ฅ printf() (1) ํŠน์ง• ์ž„์˜์˜๊ฐœ์ˆ˜์˜์ธ์ž์ถœ๋ ฅ ๊ฐ„๋‹จํ•œ๋ณ€ํ™˜๋ช…์„ธ๋‚˜ํ˜•์‹์„์‚ฌ์šฉํ•œ์ถœ๋ ฅ์ œ์–ด ํ˜•์‹ printf(control_string, other_argument) ์˜ˆ printf("she sells %d %s for $%f", 99, "sea shells", 3.77); control_string: "she sells %d %s for $%f"

More information

C++-ยฟรยบยฎร‡ร˜ยผยณ10ร€รฅ

C++-ยฟรยบยฎร‡ร˜ยผยณ10ร€รฅ C C++. (preprocessor directives), C C++ C/C++... C++, C. C++ C. C C++. C,, C++, C++., C++.,.. #define #elif #else #error #if #itdef #ifndef #include #line #pragma #undef #.,.,. #include #include

More information

ๆญฏ7์žฅ.PDF

ๆญฏ7์žฅ.PDF 7 Hello!! C 2 . 3 ([] ) < > [ ]; int array[10]; < > [ ][ ]; int array [3] [5]; 4 < > [ ]={ x1,,x10} ( ); (,). ({}). : int array[10]={1,2,3,4,5,6,7,8,9,10}; (" "). : char array[7]="turbo-c"; 5 int array[2][3]={{1,2},{3,4},{5,6}};

More information

chap7.PDF

chap7.PDF 7 Hello!! C 2 . 3 ([] ) < > [ ]; int array[10]; < > [ ][ ]; int array [3] [5]; 4 < > [ ]={ x1,,x10} ( ); (,). ({}). : int array[10]={1,2,3,4,5,6,7,8,9,10}; (" "). : char array[7]="turbo-c"; 5 int array[2][3]={{1,2},{3,4},{5,6}};

More information

untitled

untitled ์ž๋ฃŒํ˜• ๊ธฐ๋ณธ์ž๋ฃŒํ˜• : char, int, float, double ๋“ฑ ํŒŒ์ƒ์ž๋ฃŒํ˜• : ๋ฐฐ์—ด, ์—ด๊ฑฐํ˜•, ๊ตฌ์กฐ์ฒด, ๊ณต์šฉ์ฒด vs struct ๊ตฌ์กฐ์ฒด _ ํƒœ๊ทธ _ ์ด๋ฆ„ ์ž๋ฃŒํ˜•๋ฉค๋ฒ„ _ ์ด๋ฆ„ ; ์ž๋ฃŒํ˜•๋ฉค๋ฒ„ _ ์ด๋ฆ„ ;... ; struct student int number; // char name[10]; // double height; // ; // x๊ฐ’๊ณผ y๊ฐ’์œผ๋กœ์ด๋ฃจ์–ด์ง€๋Š”ํ™”๋ฉด์˜์ขŒํ‘œ

More information

<4D F736F F F696E74202D D20B9AEC0DABFAD2C20BDBAC6AEB8B2B0FA20C6C4C0CF20C0D4C3E2B7C2>

<4D F736F F F696E74202D D20B9AEC0DABFAD2C20BDBAC6AEB8B2B0FA20C6C4C0CF20C0D4C3E2B7C2> ๋ฌธ์ž์—ด์ฒ˜๋ฆฌ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ ํ•จ์ˆ˜ ์„ค๋ช… strlen(s) ๋ฌธ์ž์—ด s์˜๊ธธ์ด๋ฅผ๊ตฌํ•œ๋‹ค. strcpy(s1, s2) s2๋ฅผ s1์—๋ณต์‚ฌํ•œ๋‹ค. strcat(s1, s2) s2๋ฅผ s1์˜๋์—๋ถ™์—ฌ๋„ฃ๋Š”๋‹ค. strcmp(s1, s2) s1๊ณผ s2๋ฅผ๋น„๊ตํ•œ๋‹ค. strncpy(s1, s2, n) s2์˜์ตœ๋Œ€n๊ฐœ์˜๋ฌธ์ž๋ฅผ s1์—๋ณต์‚ฌํ•œ๋‹ค. strncat(s1, s2, n) s2์˜์ตœ๋Œ€n๊ฐœ์˜๋ฌธ์ž๋ฅผ s1์˜๋์—๋ถ™์—ฌ๋„ฃ๋Š”๋‹ค.

More information

์ œ7์žฅ C ํ‘œ์ค€ ํŒŒ์ผ ์ž…์ถœ๋ ฅ

์ œ7์žฅ C ํ‘œ์ค€ ํŒŒ์ผ ์ž…์ถœ๋ ฅ ์ œ 7 ์žฅ C ํ‘œ์ค€ํŒŒ์ผ์ž…์ถœ๋ ฅ ๋ฆฌ๋ˆ…์Šค์‹œ์Šคํ…œํ”„๋กœ๊ทธ๋ž˜๋ฐ ์ฒญ์ฃผ๋Œ€ํ•™๊ต์ „์ž๊ณตํ•™๊ณผ ํ•œ์ฒ ์ˆ˜ ๋ชฉ์ฐจ ํŒŒ์ผ๋ฐํŒŒ์ผํฌ์ธํ„ฐ ํ…์ŠคํŠธํŒŒ์ผ ์ด์ง„ํŒŒ์ผ ์ž„์˜์ ‘๊ทผ ๋ฒ„ํผ์ž…์ถœ๋ ฅ ๊ธฐํƒ€ํ•จ์ˆ˜ 2 7.1 ์ ˆ ์‹œ์Šคํ…œํ˜ธ์ถœ๊ณผ C ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌํ•จ์ˆ˜ ์‘์šฉํ”„๋กœ๊ทธ๋žจ์ด์ปค๋„์—์„œ๋น„์Šค๋ฅผ์š”์ฒญํ•˜๋Š”๋ฐฉ๋ฒ• ๋ฐฉ๋ฒ• 1: ์‹œ์Šคํ…œํ˜ธ์ถœ (system call) ์„์ด์šฉํ•˜์—ฌ์š”์ฒญ. ๋ฐฉ๋ฒ• 2: C ์–ธ์–ด๊ฐ€์ œ๊ณตํ•˜๋Š”๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌํ•จ์ˆ˜๋ฅผ์ด์šฉํ•˜์—ฌ์š”์ฒญ. ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌํ•จ์ˆ˜๋Š”๋‚ด๋ถ€์ ์œผ๋กœ์‹œ์Šคํ…œํ˜ธ์ถœ์„์ด์šฉํ•จ.

More information

์ œ7์žฅ C ํ‘œ์ค€ ํŒŒ์ผ ์ž…์ถœ๋ ฅ

์ œ7์žฅ C ํ‘œ์ค€ ํŒŒ์ผ ์ž…์ถœ๋ ฅ ์ œ 7 ์žฅ C ํ‘œ์ค€ํŒŒ์ผ์ž…์ถœ๋ ฅ ๋ฆฌ๋ˆ…์Šค์‹œ์Šคํ…œํ”„๋กœ๊ทธ๋ž˜๋ฐ ์ฒญ์ฃผ๋Œ€ํ•™๊ต์ „์ž๊ณตํ•™๊ณผ ํ•œ์ฒ ์ˆ˜ 1 ๋ชฉ์ฐจ ํŒŒ์ผ๋ฐํŒŒ์ผํฌ์ธํ„ฐ ํ…์ŠคํŠธํŒŒ์ผ ์ด์ง„ํŒŒ์ผ ์ž„์˜์ ‘๊ทผ ๋ฒ„ํผ์ž…์ถœ๋ ฅ ๊ธฐํƒ€ํ•จ์ˆ˜ 2 7.1 ์ ˆ ์‹œ์Šคํ…œํ˜ธ์ถœ๊ณผ C ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌํ•จ์ˆ˜ ์‘์šฉํ”„๋กœ๊ทธ๋žจ์ด์ปค๋„์—์„œ๋น„์Šค๋ฅผ์š”์ฒญํ•˜๋Š”๋ฐฉ๋ฒ• ๋ฐฉ๋ฒ• 1: ์‹œ์Šคํ…œํ˜ธ์ถœ (system call) ์„์ด์šฉํ•˜์—ฌ์š”์ฒญํ•จ. ๋ฐฉ๋ฒ• 2: C ์–ธ์–ด๊ฐ€์ œ๊ณตํ•˜๋Š”๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌํ•จ์ˆ˜๋ฅผ์ด์šฉํ•˜์—ฌ์š”์ฒญํ•จ. ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌํ•จ์ˆ˜๋‚ด์—์„œ์‹œ์Šคํ…œํ˜ธ์ถœ์„์ด์šฉํ•˜๊ณ ์žˆ์Œ.

More information

์ œ1์žฅ Unix๋ž€ ๋ฌด์—‡์ธ๊ฐ€?

์ œ1์žฅ  Unix๋ž€ ๋ฌด์—‡์ธ๊ฐ€? 4 ์žฅํŒŒ์ผ ์ปดํ“จํ„ฐ๊ณผํ•™๊ณผ๋ฐ•ํ™˜์ˆ˜ 1 2 4.1 ์‹œ์Šคํ…œํ˜ธ์ถœ ์ปดํ“จํ„ฐ์‹œ์Šคํ…œ๊ตฌ์กฐ ์œ ๋‹‰์Šค์ปค๋„ (kernel) ํ•˜๋“œ์›จ์–ด๋ฅผ์šด์˜๊ด€๋ฆฌํ•˜์—ฌ๋‹ค์Œ๊ณผ๊ฐ™์€์„œ๋น„์Šค๋ฅผ์ œ๊ณต ํŒŒ์ผ๊ด€๋ฆฌ (File management) ํ”„๋กœ์„ธ์Šค๊ด€๋ฆฌ (Process management) ๋ฉ”๋ชจ๋ฆฌ๊ด€๋ฆฌ (Memory management) ํ†ต์‹ ๊ด€๋ฆฌ (Communication management) ์ฃผ๋ณ€์žฅ์น˜๊ด€๋ฆฌ (Device

More information

Microsoft PowerPoint - Lecture 4-1 Linux File Environment.ppt [ํ˜ธํ™˜ ๋ชจ๋“œ]

Microsoft PowerPoint - Lecture 4-1 Linux File Environment.ppt [ํ˜ธํ™˜ ๋ชจ๋“œ] Liux Programmig Sprig 2008 File Hadlig Importat cotets Liux ์—์„œ C ์ปดํŒŒ์ผ๋ฐฉ๋ฒ• File ์ฒ˜๋ฆฌํ”„๋กœ๊ทธ๋ž˜๋ฐ Liux ํ™˜๊ฒฝ์ ‘๊ทผํ”„๋กœ๊ทธ๋ž˜๋ฐ Kogju Natioal Uiversity Liux System Programmig 2/29 Basic compilig method Liux C Compiler : gcc, cc ๊ธฐ๋ณธ

More information

<4D F736F F F696E74202D20B8AEB4AABDBA20BFC0B7F920C3B3B8AEC7CFB1E22E BC8A3C8AF20B8F0B5E55D>

<4D F736F F F696E74202D20B8AEB4AABDBA20BFC0B7F920C3B3B8AEC7CFB1E22E BC8A3C8AF20B8F0B5E55D> ๋ฆฌ๋ˆ…์Šค ์˜ค๋ฅ˜์ฒ˜๋ฆฌํ•˜๊ธฐ 2007. 11. 28 ์•ˆํšจ์ฐฝ ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌํ•จ์ˆ˜์˜์˜ค๋ฅ˜๋ฒˆํ˜ธ์–ป๊ธฐ errno ๋ณ€์ˆ˜๊ธฐ๋Šฅ์˜ค๋ฅ˜๋ฒˆํ˜ธ๋ฅผ์ €์žฅํ•œ๋‹ค. ๊ธฐ๋ณธํ˜• extern int errno; ํ—ค๋”ํŒŒ์ผ ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌํ•จ์ˆ˜ํ˜ธ์ถœ์—์‹คํŒจํ–ˆ์„๋•Œํ•จ์ˆ˜์˜ˆ ์ •์ˆ˜๊ฐ’์„๋ฐ˜ํ™˜ํ•˜๋Š”ํ•จ์ˆ˜ -1 ๋ฐ˜ํ™˜ open ํ•จ์ˆ˜ ํฌ์ธํ„ฐ๋ฅผ๋ฐ˜ํ™˜ํ•˜๋Š”ํ•จ์ˆ˜ NULL ๋ฐ˜ํ™˜ fopen ํ•จ์ˆ˜ 2 ์œ ๋‹‰์Šค / ๋ฆฌ๋ˆ…์Šค ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌํ•จ์ˆ˜์˜์˜ค๋ฅ˜๋ฒˆํ˜ธ์–ป๊ธฐ 19-1

More information

Microsoft PowerPoint - Ch12.ํŒŒ์ผ.pptx

Microsoft PowerPoint - Ch12.ํŒŒ์ผ.pptx ํŒŒ์ผ์˜๊ธฐ๋ณธ๊ฐœ๋…๊ณผํŠน์ง•์„์ดํ•ดํ•œ๋‹ค. ํŒŒ์ผ์ฒ˜๋ฆฌ๊ณผ์ •์„์ดํ•ดํ•œ๋‹ค. ํ˜•์‹์„์ง€์ •ํ•œํŒŒ์ผ์ž…์ถœ๋ ฅ fscanf/fprintf๋ฅผ๋ฐฐ์šด๋‹ค. ๋ฌธ์ž๋‹จ์œ„์ž…์ถœ๋ ฅ fgetc/fputc๋ฅผ๋ฐฐ์šด๋‹ค. ๋ฌธ์ž์—ด๋‹จ์œ„์ž…์ถœ๋ ฅ fgets/fputs๋ฅผ๋ฐฐ์šด๋‹ค. ์ด์ง„ํŒŒ์ผ์ž…์ถœ๋ ฅ fread/fwrite๋ฅผ๋ฐฐ์šด๋‹ค. ์ž„์˜์ ‘๊ทผ์„ํ†ตํ•œํŒŒ์ผ์ž…์ถœ๋ ฅ์„์œ„ํ•œ fseek, rewind, ftell์„๋ฐฐ์šด๋‹ค. 12.0 ๊ฐœ์š” p.592 ํ‘œ์ค€์ž…์ถœ๋ ฅ๊ณผํŒŒ์ผ์ž…์ถœ๋ ฅ

More information

6์ฃผ์ฐจ.key

6์ฃผ์ฐจ.key 6, Process concept A program in execution Program code PCB (process control block) Program counter, registers, etc. Stack Heap Data section => global variable Process in memory Process state New Running

More information

Microsoft PowerPoint - Cํ”„๋กœ๊ทธ๋ž˜๋ฐ-chap15.ppt [ํ˜ธํ™˜ ๋ชจ๋“œ]

Microsoft PowerPoint - Cํ”„๋กœ๊ทธ๋ž˜๋ฐ-chap15.ppt [ํ˜ธํ™˜ ๋ชจ๋“œ] Chapter 15 ๋ฌธ์ž์—ด 2009 ํ•œ๊ตญํ•ญ๊ณต๋Œ€ํ•™๊ตํ•ญ๊ณต์šฐ์ฃผ๊ธฐ๊ณ„๊ณตํ•™๋ถ€ (http://mercury.kau.ac.kr/sjkwon) 1 ๋ฌธ์ž์˜์ง‘ํ•ฉ์ฒด ๋ฌธ์ž์—ด์˜์ •์˜ ์ผ๋ จ์˜๋ฌธ์ž C ์–ธ์–ด์—์„œ๋ฌธ์ž์—ด์•ž๋’ค์—์ธ์šฉ๋ถ€ํ˜ธ ๋ฅผ์ด์šฉ ๋ฌธ์ž์™€๋ฌธ์ž์—ด๊ณผ์˜์ฐจ์ด ๋ฌธ์ž์—ด์˜์ €์žฅ (1) ๋ฐฐ์—ด์„์ด์šฉํ•˜๋Š”๋ฐฉ๋ฒ• ๋ฌธ์ž์—ด์ƒ์ˆ˜ c c language ๋ฅผ์ €์žฅํ•˜๋Š”๋ฌธ์ž์—ด๋ฐฐ์—ด ํ•ญ์ƒ๋ฌธ์ž์—ด๋งˆ์ง€๋ง‰์—๋Š” NULL๋ฌธ์ž๋ฅผ๋„ฃ์–ด์•ผํ•จ (2)

More information

๋ฌธ์ œ๋Š”๋‹ค์–‘ํ•œ๋ฐฉ๋ฒ•์œผ๋กœํ’€์ˆ˜์žˆ์œผ๋ฉฐ, ๋‹ค์Œ์˜ํ’€์ด๋Š”์—ฌ๋Ÿฌํ•ด๋ฒ•์ค‘ํ•˜๋‚˜์ด๋‹ค. [ ๋ฌธ์ œ 1] ๋ฐ€๋„๊ตฌํ•˜๊ธฐ ์งˆ๋Ÿ‰๋ฐ€๋„ ์ด๋‹ค. ๋ฌผ์ฒด์˜์งˆ๋Ÿ‰ M๊ณผ๋ถ€ํ”ผ V๊ฐ€์ฃผ์–ด์ง€๋ฉด๋ฐ€๋„๋Š” M/V๋กœ๊ตฌํ• ์ˆ˜์žˆ๋‹ค. ๋ถ€ํ”ผ ์—ฌ๊ธฐ์„œ์งˆ๋Ÿ‰ M ๊ณผ๋ถ€ํ”ผ V ๋Š”์ •์ˆ˜์ด์ง€๋งŒ M/V ์€์‹ค์ˆ˜๊ฐ€๋ ์ˆ˜์žˆ๊ธฐ๋•Œ๋ฌธ์— M ๊ณผ V ๋ฅผ๋ฐ› ์„๋•Œ์‹ค์ˆ˜๋กœ์ž…๋ ฅ๋ฐ›๋Š”๋‹ค.

๋ฌธ์ œ๋Š”๋‹ค์–‘ํ•œ๋ฐฉ๋ฒ•์œผ๋กœํ’€์ˆ˜์žˆ์œผ๋ฉฐ, ๋‹ค์Œ์˜ํ’€์ด๋Š”์—ฌ๋Ÿฌํ•ด๋ฒ•์ค‘ํ•˜๋‚˜์ด๋‹ค. [ ๋ฌธ์ œ 1] ๋ฐ€๋„๊ตฌํ•˜๊ธฐ ์งˆ๋Ÿ‰๋ฐ€๋„ ์ด๋‹ค. ๋ฌผ์ฒด์˜์งˆ๋Ÿ‰ M๊ณผ๋ถ€ํ”ผ V๊ฐ€์ฃผ์–ด์ง€๋ฉด๋ฐ€๋„๋Š” M/V๋กœ๊ตฌํ• ์ˆ˜์žˆ๋‹ค. ๋ถ€ํ”ผ ์—ฌ๊ธฐ์„œ์งˆ๋Ÿ‰ M ๊ณผ๋ถ€ํ”ผ V ๋Š”์ •์ˆ˜์ด์ง€๋งŒ M/V ์€์‹ค์ˆ˜๊ฐ€๋ ์ˆ˜์žˆ๊ธฐ๋•Œ๋ฌธ์— M ๊ณผ V ๋ฅผ๋ฐ› ์„๋•Œ์‹ค์ˆ˜๋กœ์ž…๋ ฅ๋ฐ›๋Š”๋‹ค. ๋ฌธ์ œ๋Š”๋‹ค์–‘ํ•œ๋ฐฉ๋ฒ•์œผ๋กœํ’€์ˆ˜์žˆ์œผ๋ฉฐ, ๋‹ค์Œ์˜ํ’€์ด๋Š”์—ฌ๋Ÿฌํ•ด๋ฒ•์ค‘ํ•˜๋‚˜์ด๋‹ค. [ ๋ฌธ์ œ 1] ๋ฐ€๋„๊ตฌํ•˜๊ธฐ ์งˆ๋Ÿ‰๋ฐ€๋„ ์ด๋‹ค. ๋ฌผ์ฒด์˜์งˆ๋Ÿ‰ M๊ณผ๋ถ€ํ”ผ V๊ฐ€์ฃผ์–ด์ง€๋ฉด๋ฐ€๋„๋Š” M/V๋กœ๊ตฌํ• ์ˆ˜์žˆ๋‹ค. ๋ถ€ํ”ผ ์—ฌ๊ธฐ์„œ์งˆ๋Ÿ‰ M ๊ณผ๋ถ€ํ”ผ V ๋Š”์ •์ˆ˜์ด์ง€๋งŒ M/V ์€์‹ค์ˆ˜๊ฐ€๋ ์ˆ˜์žˆ๊ธฐ๋•Œ๋ฌธ์— M ๊ณผ V ๋ฅผ๋ฐ› ์„๋•Œ์‹ค์ˆ˜๋กœ์ž…๋ ฅ๋ฐ›๋Š”๋‹ค. ๋ฌผ์ฒด์˜์šด๋™์€์•ก์ฒด์˜๋ฐ€๋„์™€๋ฌผ์ฒด์˜๋ฐ€๋„์™€๋น„๊ต๋ฅผํ†ตํ•ด์•Œ์ˆ˜์žˆ๋‹ค. - ์•ก์ฒด์˜๋ฐ€๋„ > ๋ฌผ์ฒด์˜๋ฐ€๋„์ด๋ฉด UP -

More information

<4D F736F F F696E74202D20C1A63136C0E520C6C4C0CFC0D4C3E2B7C2>

<4D F736F F F696E74202D20C1A63136C0E520C6C4C0CFC0D4C3E2B7C2> ์‰ฝ๊ฒŒํ’€์–ด์“ด C ์–ธ์–ด Express ์ œ 16 ์žฅํŒŒ์ผ์ž…์ถœ๋ ฅ ์ด๋ฒˆ์žฅ์—์„œํ•™์Šตํ• ๋‚ด์šฉ ์ŠคํŠธ๋ฆฝ์˜๊ฐœ๋… ํ‘œ์ค€์ž…์ถœ๋ ฅ ํŒŒ์ผ์ž…์ถœ๋ ฅ ์ž…์ถœ๋ ฅ๊ด€๋ จํ•จ์ˆ˜ ์ž…์ถœ๋ ฅ์—๊ด€๋ จ๋œ๊ฐœ๋…๋“ค๊ณผํ•จ์ˆ˜๋“ค์—๋Œ€ํ•˜์—ฌํ•™์Šตํ•œ๋‹ค. ์ŠคํŠธ๋ฆผ์˜๊ฐœ๋… ์ŠคํŠธ๋ฆผ (stream): ์ž…๋ ฅ๊ณผ์ถœ๋ ฅ์„๋ฐ”์ดํŠธ (byte) ๋“ค์˜ํ๋ฆ„์œผ๋กœ์ƒ๊ฐํ•˜๋Š”๊ฒƒ ์ŠคํŠธ๋ฆผ๊ณผ๋ฒ„ํผ ์ŠคํŠธ๋ฆผ์—๋Š”๊ธฐ๋ณธ์ ์œผ๋กœ๋ฒ„ํผ๊ฐ€ํฌํ•จ๋˜์–ด์žˆ๋‹ค. ํ‘œ์ค€์ž…์ถœ๋ ฅ์ŠคํŠธ๋ฆผ ๊ธฐ๋ณธ์ ์ธ์ŠคํŠธ๋ฆผ๋“ค์€ํ”„๋กœ๊ทธ๋ž˜๋จธ๊ฐ€์ƒ์„ฑํ•˜์ง€์•Š์•„๋„์ž๋™์œผ๋กœ์ƒ์„ฑ๋œ๋‹ค.

More information

Microsoft PowerPoint - C_Programming_Basics.ppt [ํ˜ธํ™˜ ๋ชจ๋“œ]

Microsoft PowerPoint - C_Programming_Basics.ppt [ํ˜ธํ™˜ ๋ชจ๋“œ] C ์–ธ์–ด ๊ธฐ๋ณธ์‚ฌํ•ญ ํ”„๋กœ๊ทธ๋žจ์˜ ๊ธฐ๋ณธ ํ‹€ main ํ•จ์ˆ˜ ํ”„๋กœ๊ทธ๋žจ์˜ ์‹œ์ž‘์ ์ด์ž ์ข…๋ฃŒ์ง€์  printf ํ•จ์ˆ˜๋ฅผ์ด์šฉํ•œ๋ฌธ์ž์—ด์ถœ๋ ฅ ๋ฌธ์ž์—ด ํ”„๋กœ๊ทธ๋žจ์ƒ์—์„œ๋Š”ํฐ๋”ฐ์˜ดํ‘œ๋กœ๋ฌถ์–ด์„œํ‘œํ˜„ํ•œ๋‹ค. printf ํ•จ์ˆ˜์˜๊ธฐ๋Šฅ ํฐ๋”ฐ์˜ดํ‘œ๋กœ๋ฌถ์—ฌ์„œํ‘œํ˜„๋˜๋Š”๋ฌธ์ž์—ด์˜์ถœ๋ ฅ printf ํ•จ์ˆ˜์˜ํ˜ธ์ถœ์„์œ„ํ•ดํ•„์š”ํ•œ๊ฒƒ #include ์˜์‚ฝ์ž… '\n' ์€๊ฐœํ–‰์˜์˜๋ฏธ๋ฅผ #include ์ง€๋‹ˆ๋Š”

More information

๋ฐ์ดํƒ€์ „์†ก

๋ฐ์ดํƒ€์ „์†ก Network Programming Autumn 2009 C Programming Related with Data Transfer and PDU Encapsulations Contents Dynamic Memory Allocation (Review!) Bit Stream I/O Bit Operations in C Conversion of Little and

More information

์ œ12์žฅ ํŒŒ์ผ ์ž…์ถœ๋ ฅ

์ œ12์žฅ ํŒŒ์ผ ์ž…์ถœ๋ ฅ ์ œ 4 ์žฅํŒŒ์ผ์ž…์ถœ๋ ฅ ๋ฆฌ๋ˆ…์Šค์‹œ์Šคํ…œํ”„๋กœ๊ทธ๋ž˜๋ฐ ์ฒญ์ฃผ๋Œ€ํ•™๊ต์ „์ž๊ณตํ•™๊ณผ ํ•œ์ฒ ์ˆ˜ 1 ์‹œ์Šคํ…œํ˜ธ์ถœ (system call) ํŒŒ์ผ (file) ์ž„์˜์ ‘๊ทผ (random access) ์ฃผ์š”ํ•™์Šต๋‚ด์šฉ 2 4.1 ์ ˆ ์ปค๋„์˜์—ญํ•  (kernel) ์ปค๋„ (kernel) ์€์šด์˜์ฒด์ œ์˜ํ•ต์‹ฌ๋ถ€๋ถ„์œผ๋กœ์„œ, ํ•˜๋“œ์›จ์–ด๋ฅผ์šด์˜๊ด€๋ฆฌํ•˜๋Š”์—ฌ๋Ÿฌ๊ฐ€์ง€์„œ๋น„์Šค๋ฅผ์ œ๊ณตํ•จ ํŒŒ์ผ๊ด€๋ฆฌ (File management) ๋””์Šคํฌ ํ”„๋กœ์„ธ์Šค๊ด€๋ฆฌ

More information

PowerPoint ํ”„๋ ˆ์  ํ…Œ์ด์…˜

PowerPoint ํ”„๋ ˆ์  ํ…Œ์ด์…˜ Network Programming Jo, Heeseung Network ์‹ค์Šต ๋„คํŠธ์›Œํฌํ”„๋กœ๊ทธ๋ž˜๋ฐ ๋ฉ€๋ฆฌ๋–จ์–ด์ ธ์žˆ๋Š”ํ˜ธ์ŠคํŠธ๋“ค์ด์„œ๋กœ๋ฐ์ดํ„ฐ๋ฅผ์ฃผ๊ณ ๋ฐ›์„์ˆ˜์žˆ๋„๋กํ”„๋กœ๊ทธ๋žจ์„๊ตฌํ˜„ํ•˜๋Š”๊ฒƒ ํŒŒ์ผ๊ณผ๋Š”๋‹ฌ๋ฆฌ๋ฐ์ดํ„ฐ๋ฅผ์ฃผ๊ณ ๋ฐ›์„๋Œ€์ƒ์ด๋ฉ€๋ฆฌ๋–จ์–ด์ ธ์žˆ๊ธฐ๋•Œ๋ฌธ์—์†Œํ”„ํŠธ์›จ์–ด์ฐจ์›์—์„œํ˜ธ์ŠคํŠธ๋“ค๊ฐ„์—์—ฐ๊ฒฐ์„ํ•ด์ฃผ๋Š”์žฅ์น˜๊ฐ€ํ•„์š” ์ด๋Ÿฌํ•œ๊ธฐ๋Šฅ์„ํ•ด์ฃผ๋Š”์žฅ์น˜๋กœ์†Œ์ผ“์ด๋ผ๋Š”์ธํ„ฐํŽ˜์ด์Šค๋ฅผ๋งŽ์ด์‚ฌ์šฉ ์†Œ์ผ“ํ”„๋กœ๊ทธ๋ž˜๋ฐ์ด๋ž€์šฉ์–ด์™€๋„คํŠธ์›Œํฌํ”„๋กœ๊ทธ๋ž˜๋ฐ์ด๋ž‘์šฉ์–ด๊ฐ€๊ฐ™์€์˜๋ฏธ๋กœ์‚ฌ์šฉ

More information

untitled

untitled Step Motor Device Driver Embedded System Lab. II Step Motor Step Motor Step Motor source Embedded System Lab. II 2 open loop, : : Pulse, 1 Pulse,, -, 1 +5%, step Step Motor (2),, Embedded System Lab. II

More information

12-file.key

12-file.key 11 (String).. java.lang.stringbuffer. s String s = "abcd"; s = s + "e"; a b c d e a b c d e ,., "910359,, " "910359" " " " " (token) (token),, (delimiter). java.util.stringtokenizer String s = "910359,,

More information

PowerPoint ํ”„๋ ˆ์  ํ…Œ์ด์…˜

PowerPoint ํ”„๋ ˆ์  ํ…Œ์ด์…˜ Chapter 08 ํ•จ์ˆ˜ 01 ํ•จ์ˆ˜์˜๊ฐœ์š” 02 ํ•จ์ˆ˜์‚ฌ์šฉํ•˜๊ธฐ 03 ํ•จ์ˆ˜์™€๋ฐฐ์—ด 04 ์žฌ๊ท€ํ•จ์ˆ˜ ํ•จ์ˆ˜์˜ํ•„์š”์„ฑ์„์ธ์‹ํ•œ๋‹ค. ํ•จ์ˆ˜๋ฅผ์ •์˜, ์„ ์–ธ, ํ˜ธ์ถœํ•˜๋Š”๋ฐฉ๋ฒ•์„์•Œ์•„๋ณธ๋‹ค. ๋ฐฐ์—ด์„ํ•จ์ˆ˜์˜์ธ์ž๋กœ์ „๋‹ฌํ•˜๋Š”๋ฐฉ๋ฒ•๊ณผ์‚ฌ์šฉ์‹œ์žฅ์ ์„์•Œ์•„๋ณธ๋‹ค. ์žฌ๊ท€ํ˜ธ์ถœ๋กœํ•ด๊ฒฐํ• ์ˆ˜์žˆ๋Š”๋ฌธ์ œ์˜ํŠน์ง•๊ณผํ•ด๊ฒฐ๋ฐฉ๋ฒ•์„์•Œ์•„๋ณธ๋‹ค. 1.1 ํ•จ์ˆ˜์˜์ •์˜์™€๊ธฐ๋Šฅ ํ•จ์ˆ˜ (function) ํŠน๋ณ„ํ•œ๊ธฐ๋Šฅ์„์ˆ˜ํ–‰ํ•˜๋Š”๊ฒƒ ์—ฌ๋Ÿฌ๊ฐ€์ง€ํ•จ์ˆ˜์˜์˜ˆ Page 4 1.2

More information

11์žฅ ํฌ์ธํ„ฐ

11์žฅ ํฌ์ธํ„ฐ ๋ˆ„๊ตฌ๋‚˜์ฆ๊ธฐ๋Š” C ์–ธ์–ด์ฝ˜์„œํŠธ ์ œ 10 ์žฅ๋ฌธ์ž์™€๋ฌธ์ž์—ด ์ด๋ฒˆ์žฅ์—์„œํ•™์Šตํ• ๋‚ด์šฉ ๋ฌธ์žํ‘œํ˜„๋ฐฉ๋ฒ• ๋ฌธ์ž์—ดํ‘œํ˜„๋ฐฉ๋ฒ• ๋ฌธ์ž์—ด์ด๋ž€๋ฌด์—‡์ธ๊ฐ€? ๋ฌธ์ž์—ด์˜์ž…์ถœ๋ ฅ ๋ฌธ์ž์ฒ˜๋ฆฌ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌํ•จ์ˆ˜ ํ‘œ์ค€์ž…์ถœ๋ ฅ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌํ•จ์ˆ˜ ๋ฌธ์ž์™€๋ฌธ์ž์—ด์ฒ˜๋ฆฌ๋ฐฉ๋ฒ•์—๋Œ€ํ•˜์—ฌ์‚ดํŽด๋ณผ๊ฒƒ์ด๋‹ค. ๋ฌธ์žํ‘œํ˜„๋ฐฉ๋ฒ• ์ปดํ“จํ„ฐ์—์„œ๋Š”๊ฐ๊ฐ์˜๋ฌธ์ž์—์ˆซ์ž์ฝ”๋“œ๋ฅผ๋ถ™์—ฌ์„œํ‘œ์‹œํ•œ๋‹ค. ์•„์Šคํ‚ค์ฝ”๋“œ (ASCII code): ํ‘œ์ค€์ ์ธ 8๋น„ํŠธ๋ฌธ์ž์ฝ”๋“œ 0์—์„œ 127๊นŒ์ง€์˜์ˆซ์ž๋ฅผ์ด์šฉํ•˜์—ฌ๋ฌธ์žํ‘œํ˜„

More information

ํ‘œ์ค€์ž…์ถœ๋ ฅ์ŠคํŠธ๋ฆผ ๊ธฐ๋ณธ์ ์ธ์ŠคํŠธ๋ฆผ๋“ค์€ํ”„๋กœ๊ทธ๋ž˜๋จธ๊ฐ€์ƒ์„ฑํ•˜์ง€์•Š์•„๋„์ž๋™์œผ๋กœ์ƒ์„ฑ๋œ๋‹ค. ์ด๋ฆ„์ŠคํŠธ๋ฆผ์—ฐ๊ฒฐ์žฅ์น˜ stdin ํ‘œ์ค€์ž…๋ ฅ์ŠคํŠธ๋ฆผํ‚ค๋ณด๋“œ stdout ํ‘œ์ค€์ถœ๋ ฅ์ŠคํŠธ๋ฆผ๋ชจ๋‹ˆํ„ฐ์˜ํ™”๋ฉด stderr ํ‘œ์ค€์˜ค๋ฅ˜์ŠคํŠธ๋ฆผ๋ชจ๋‹ˆํ„ฐ์˜ํ™”๋ฉด ์ž…์ถœ๋ ฅํ•จ์ˆ˜์˜๋ถ„๋ฅ˜ ์‚ฌ์šฉํ•˜๋Š”์ŠคํŠธ๋ฆผ์—๋”ฐ๋ฅธ๋ถ„๋ฅ˜ ํ‘œ์ค€์ž…์ถœ๋ ฅ์ŠคํŠธ๋ฆผ์„์‚ฌ์šฉํ•˜์—ฌ์ž…์ถœ๋ ฅ์„ํ•˜

ํ‘œ์ค€์ž…์ถœ๋ ฅ์ŠคํŠธ๋ฆผ ๊ธฐ๋ณธ์ ์ธ์ŠคํŠธ๋ฆผ๋“ค์€ํ”„๋กœ๊ทธ๋ž˜๋จธ๊ฐ€์ƒ์„ฑํ•˜์ง€์•Š์•„๋„์ž๋™์œผ๋กœ์ƒ์„ฑ๋œ๋‹ค. ์ด๋ฆ„์ŠคํŠธ๋ฆผ์—ฐ๊ฒฐ์žฅ์น˜ stdin ํ‘œ์ค€์ž…๋ ฅ์ŠคํŠธ๋ฆผํ‚ค๋ณด๋“œ stdout ํ‘œ์ค€์ถœ๋ ฅ์ŠคํŠธ๋ฆผ๋ชจ๋‹ˆํ„ฐ์˜ํ™”๋ฉด stderr ํ‘œ์ค€์˜ค๋ฅ˜์ŠคํŠธ๋ฆผ๋ชจ๋‹ˆํ„ฐ์˜ํ™”๋ฉด ์ž…์ถœ๋ ฅํ•จ์ˆ˜์˜๋ถ„๋ฅ˜ ์‚ฌ์šฉํ•˜๋Š”์ŠคํŠธ๋ฆผ์—๋”ฐ๋ฅธ๋ถ„๋ฅ˜ ํ‘œ์ค€์ž…์ถœ๋ ฅ์ŠคํŠธ๋ฆผ์„์‚ฌ์šฉํ•˜์—ฌ์ž…์ถœ๋ ฅ์„ํ•˜ ์‰ฝ๊ฒŒํ’€์–ด์“ด C ์–ธ์–ด Express ์ด๋ฒˆ์žฅ์—์„œํ•™์Šตํ• ๋‚ด์šฉ ์ œ 16 ์žฅํŒŒ์ผ์ž…์ถœ๋ ฅ ์ŠคํŠธ๋ฆฝ์˜๊ฐœ๋… ํ‘œ์ค€์ž…์ถœ๋ ฅ ํŒŒ์ผ์ž…์ถœ๋ ฅ ์ž…์ถœ๋ ฅ๊ด€๋ จํ•จ์ˆ˜ ์ž…์ถœ๋ ฅ์—๊ด€๋ จ๋œ๊ฐœ๋…๋“ค๊ณผํ•จ์ˆ˜๋“ค์—๋Œ€ํ•˜์—ฌํ•™์Šตํ•œ๋‹ค. ์ŠคํŠธ๋ฆผ์˜๊ฐœ๋… ์ŠคํŠธ๋ฆผ (stream): ์ž…๋ ฅ๊ณผ์ถœ๋ ฅ์„๋ฐ”์ดํŠธ (byte) ๋“ค์˜ํ๋ฆ„์œผ๋กœ์ƒ๊ฐํ•˜๋Š”๊ฒƒ ์ŠคํŠธ๋ฆผ๊ณผ๋ฒ„ํผ ์ŠคํŠธ๋ฆผ์—๋Š”๊ธฐ๋ณธ์ ์œผ๋กœ๋ฒ„ํผ๊ฐ€ํฌํ•จ๋˜์–ด์žˆ๋‹ค. 1 ํ‘œ์ค€์ž…์ถœ๋ ฅ์ŠคํŠธ๋ฆผ ๊ธฐ๋ณธ์ ์ธ์ŠคํŠธ๋ฆผ๋“ค์€ํ”„๋กœ๊ทธ๋ž˜๋จธ๊ฐ€์ƒ์„ฑํ•˜์ง€์•Š์•„๋„์ž๋™์œผ๋กœ์ƒ์„ฑ๋œ๋‹ค.

More information

Cํ”„๋กœ-3์žฅc03้€žํ’š

Cํ”„๋กœ-3์žฅc03้€žํ’š C h a p t e r 03 C++ 3 1 9 4 3 break continue 2 110 if if else if else switch 1 if if if 3 1 1 if 2 2 3 if if 1 2 111 01 #include 02 using namespace std; 03 void main( ) 04 { 05 int x; 06 07

More information

Microsoft PowerPoint - chap11-ํฌ์ธํ„ฐ์˜ํ™œ์šฉ.pptx

Microsoft PowerPoint - chap11-ํฌ์ธํ„ฐ์˜ํ™œ์šฉ.pptx #include int main(void) int num; printf( Please enter an integer: "); scanf("%d", &num); if ( num < 0 ) printf("is negative.\n"); printf("num = %d\n", num); return 0; 1 ํ•™์Šต๋ชฉํ‘œ ํฌ์ธํ„ฐ๋ฅผ ์‚ฌ์šฉํ•˜๋Š” ๋‹ค์–‘ํ•œ ๋ฐฉ๋ฒ•์—

More information

2007_2_project4

2007_2_project4 Programming Methodology Instructor: Kyuseok Shim Project #4: external sort with template Due Date: 0:0 a.m. between 2007-12-2 & 2007-12-3 Introduction ์ดํ”„๋กœ์ ํŠธ๋Š” C++ ์˜ template์„์ด์šฉํ•œ sorting algorithm๊ณผ์ •๋ ฌํ•ด์•ผํ• ๋ฐ์ดํ„ฐ์˜ํฌ๊ธฐ๊ฐ€

More information

2009๋…„ ์ƒ๋ฐ˜๊ธฐ ์‚ฌ์—…๊ณ„ํš

2009๋…„ ์ƒ๋ฐ˜๊ธฐ ์‚ฌ์—…๊ณ„ํš ํŒŒ์ผ์ž…์ถœ๋ ฅ IT CookBook, ์œ ๋‹‰์Šค์‹œ์Šคํ…œํ”„๋กœ๊ทธ๋ž˜๋ฐ ํ•™์Šต๋ชฉํ‘œ ์œ ๋‹‰์Šค์—์„œํŒŒ์ผ์ž…์ถœ๋ ฅ์˜ํŠน์ง•์„์ดํ•ดํ•œ๋‹ค. ์ €์ˆ˜์ค€ํŒŒ์ผ์ž…์ถœ๋ ฅํ•จ์ˆ˜๋ฅผ์‚ฌ์šฉํ• ์ˆ˜์žˆ๋‹ค. ๊ณ ์ˆ˜์ค€ํŒŒ์ผ์ž…์ถœ๋ ฅํ•จ์ˆ˜๋ฅผ์‚ฌ์šฉํ• ์ˆ˜์žˆ๋‹ค. ์ž„์‹œํŒŒ์ผ์„์ƒ์„ฑํ•ดํŒŒ์ผ์ž…์ถœ๋ ฅ์„ํ• ์ˆ˜์žˆ๋‹ค. 2/51 ๋ชฉ์ฐจ ์ €์ˆ˜์ค€ํŒŒ์ผ์ž…์ถœ๋ ฅ ํŒŒ์ผ๊ธฐ์ˆ ์ž ํŒŒ์ผ์ƒ์„ฑ๊ณผ์—ด๊ณ ๋‹ซ๊ธฐ ํŒŒ์ผ์ฝ๊ธฐ์™€์“ฐ๊ธฐ ํŒŒ์ผ์˜คํ”„์…‹์ง€์ • ํŒŒ์ผ๊ธฐ์ˆ ์ž๋ณต์‚ฌ ํŒŒ์ผ๊ธฐ์ˆ ์ž์ œ์–ด ํŒŒ์ผ์‚ญ์ œ ๊ณ ์ˆ˜์ค€ํŒŒ์ผ์ž…์ถœ๋ ฅ ํŒŒ์ผํฌ์ธํ„ฐ ํŒŒ์ผ์—ด๊ธฐ์™€๋‹ซ๊ธฐ

More information

PowerPoint ํ”„๋ ˆ์  ํ…Œ์ด์…˜

PowerPoint ํ”„๋ ˆ์  ํ…Œ์ด์…˜ ERROR AND COMMAND LINE ARGUMENTS Jo, Heeseung ํ•™์Šต๋ชฉํ‘œ ์˜ค๋ฅ˜์ฒ˜๋ฆฌํ•จ์ˆ˜ ๋™์ ๋ฉ”๋ชจ๋ฆฌํ• ๋‹น ๋ช…๋ นํ–‰์ธ์ž 2 ์˜ค๋ฅ˜์ฒ˜๋ฆฌํ•จ์ˆ˜ [1] ์˜ค๋ฅ˜๋ฉ”์‹œ์ง€์ถœ๋ ฅ : perror(3) #include void perror(const char *s); [ ์˜ˆ์ œ 1-4] perror ํ•จ์ˆ˜์‚ฌ์šฉํ•˜๊ธฐ 01 #include

More information

Microsoft PowerPoint - chap1 [ํ˜ธํ™˜ ๋ชจ๋“œ]

Microsoft PowerPoint - chap1 [ํ˜ธํ™˜ ๋ชจ๋“œ] ๊ณ ๊ธ‰์‹œ์Šคํ…œํ”„๋กœ๊ทธ๋ž˜๋ฐ ์ œ 1 ์žฅ์†Œ๊ฐœ ์ฐฝ๋ณ‘๋ชจ์ˆ™๋ช…์—ฌ๋Œ€์ปดํ“จํ„ฐ๊ณผํ•™๊ณผ 1 ๊ฐ•์˜๋ชฉ์  ์‹œ์Šคํ…œํ”„๋กœ๊ทธ๋ž˜๋ฐ file, process, network programming Unix ์‹œ์Šคํ…œ์˜์ฒด๊ณ„์ ์ดํ•ด ๊ณ ๊ธ‰์‹œ์Šคํ…œํ”„๋กœ๊ทธ๋ž˜๋ฐ๋Šฅ๋ ฅํ–ฅ์ƒ 2 ๋™๊ธฐ ์‹œ์Šคํ…œํ”„๋กœ๊ทธ๋ž˜๋ฐ OS ์ง€์›์„์ด์šฉํ•œํ”„๋กœ๊ทธ๋ž˜๋ฐ Unix ์‹œ์Šคํ…œํ˜ธ์ถœ์‚ฌ์šฉ file, process, IPC, networking, ํŒŒ์ผ๊ด€๋ฆฌ์†Œํ”„ํŠธ์›จ์–ด๋„คํŠธ์›Œํฌ๊ด€๋ จ์†Œํ”„ํŠธ์›จ์–ด

More information

๋ชฉ์ฐจ ๋ฐฐ์—ด์˜๊ฐœ์š” ๋ฐฐ์—ด์‚ฌ์šฉํ•˜๊ธฐ ๋‹ค์ฐจ์›๋ฐฐ์—ด ๋ฐฐ์—ด์„์ด์šฉํ•œ๋ฌธ์ž์—ด๋‹ค๋ฃจ๊ธฐ ์‹ค๋ฌด์‘์šฉ์˜ˆ์ œ C 2

๋ชฉ์ฐจ ๋ฐฐ์—ด์˜๊ฐœ์š” ๋ฐฐ์—ด์‚ฌ์šฉํ•˜๊ธฐ ๋‹ค์ฐจ์›๋ฐฐ์—ด ๋ฐฐ์—ด์„์ด์šฉํ•œ๋ฌธ์ž์—ด๋‹ค๋ฃจ๊ธฐ ์‹ค๋ฌด์‘์šฉ์˜ˆ์ œ C 2 ์ œ 7 ์žฅ. ๋ฐฐ์—ด ๋ชฉ์ฐจ ๋ฐฐ์—ด์˜๊ฐœ์š” ๋ฐฐ์—ด์‚ฌ์šฉํ•˜๊ธฐ ๋‹ค์ฐจ์›๋ฐฐ์—ด ๋ฐฐ์—ด์„์ด์šฉํ•œ๋ฌธ์ž์—ด๋‹ค๋ฃจ๊ธฐ ์‹ค๋ฌด์‘์šฉ์˜ˆ์ œ C 2 ๋ฐฐ์—ด์˜๊ฐœ์š” ๋ฐฐ์—ด (array) ์˜์ •์˜ ๊ฐ™์€๋ฐ์ดํ„ฐํ˜•์„๊ฐ€์ง€๋Š”์—ฌ๋Ÿฌ๊ฐœ์˜๋ณ€์ˆ˜๋ฅผํ•˜๋‚˜์˜๋ฐฐ์—ด๋ช…์œผ๋กœ๊ณต์œ  ๊ธฐ์–ต๊ณต๊ฐ„์„์ˆœ์ฐจ์ ์œผ๋กœํ• ๋‹น๋ฐ›์•„์‚ฌ์šฉํ•˜๋Š”๊ฒƒ [ 7.1] C 3 ๋ฐฐ์—ด์˜๊ฐœ์š” ๋ฐฐ์—ด (array) ์˜ํ•„์š”์„ฑ ๊ฐ™์€๋ฐ์ดํ„ฐํ˜•์˜์—ฌ๋Ÿฌ๊ฐœ์˜๋ณ€์ˆ˜๊ฐ„๊ฒฐํ•˜๊ฒŒ์„ ์–ธ ๊ธฐ์–ต๊ณต๊ฐ„์„์ˆœ์ฐจ์ ์œผ๋กœ๋ณ€์ˆ˜์˜๊ฐ’๋“ค์„์ €์žฅ, ๊ด€๋ฆฌ

More information

Microsoft PowerPoint - [2009] 02.pptx

Microsoft PowerPoint - [2009] 02.pptx ์›์‹œ๋ฐ์ดํ„ฐ์œ ํ˜•๊ณผ์—ฐ์‚ฐ ์›์‹œ๋ฐ์ดํ„ฐ์œ ํ˜•๊ณผ์—ฐ์‚ฐ ์›์‹œ๋ฐ์ดํ„ฐ์œ ํ˜•๊ณผ์—ฐ์‚ฐ ์ˆซ์ž๋ฐ์ดํ„ฐ์œ ํ˜• - ์ˆซ์ž๋ฐ์ดํ„ฐ์œ ํ˜• ์›์‹œ๋ฐ์ดํ„ฐ์œ ํ˜•๊ณผ์—ฐ์‚ฐ ํ‘œ์ค€์ž…์ถœ๋ ฅํ•จ์ˆ˜ - printf ๋ฌธ ๊ฐ€์žฅ๊ธฐ๋ณธ์ ์ธ์ถœ๋ ฅํ•จ์ˆ˜. (stdio.h) ๋ฌธ๋ฒ• ) printf( Test printf. a = %d \n, a); printf( %d, %f, %c \n, a, b, c); #include #include

More information

PowerPoint ํ”„๋ ˆ์  ํ…Œ์ด์…˜

PowerPoint ํ”„๋ ˆ์  ํ…Œ์ด์…˜ @ Lesson 3 if, if else, if else if, switch case for, while, do while break, continue : System.in, args, JOptionPane for (,, ) @ vs. logic data method variable Data Data Flow (Type), ( ) @ Member field

More information

11์žฅ ํฌ์ธํ„ฐ

11์žฅ ํฌ์ธํ„ฐ ๋ˆ„๊ตฌ๋‚˜์ฆ๊ธฐ๋Š” C ์–ธ์–ด์ฝ˜์„œํŠธ ์ œ 10 ์žฅ๋ฌธ์ž์™€๋ฌธ์ž์—ด ์ด๋ฒˆ์žฅ์—์„œํ•™์Šตํ• ๋‚ด์šฉ ๋ฌธ์žํ‘œํ˜„๋ฐฉ๋ฒ• ๋ฌธ์ž์—ดํ‘œํ˜„๋ฐฉ๋ฒ• ๋ฌธ์ž์—ด์ด๋ž€๋ฌด์—‡์ธ๊ฐ€? ๋ฌธ์ž์—ด์˜์ž…์ถœ๋ ฅ ๋ฌธ์ž์ฒ˜๋ฆฌ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌํ•จ์ˆ˜ ํ‘œ์ค€์ž…์ถœ๋ ฅ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌํ•จ์ˆ˜ ๋ฌธ์ž์™€๋ฌธ์ž์—ด์ฒ˜๋ฆฌ๋ฐฉ๋ฒ•์—๋Œ€ํ•˜์—ฌ์‚ดํŽด๋ณผ๊ฒƒ์ด๋‹ค. ๋ฌธ์žํ‘œํ˜„๋ฐฉ๋ฒ• ์ปดํ“จํ„ฐ์—์„œ๋Š”๊ฐ๊ฐ์˜๋ฌธ์ž์—์ˆซ์ž์ฝ”๋“œ๋ฅผ๋ถ™์—ฌ์„œํ‘œ์‹œํ•œ๋‹ค. ์•„์Šคํ‚ค์ฝ”๋“œ (ASCII code): ํ‘œ์ค€์ ์ธ 8๋น„ํŠธ๋ฌธ์ž์ฝ”๋“œ 0์—์„œ 127๊นŒ์ง€์˜์ˆซ์ž๋ฅผ์ด์šฉํ•˜์—ฌ๋ฌธ์žํ‘œํ˜„

More information

<443A5C4C C4B48555C B3E25C32C7D0B1E25CBCB3B0E8C7C1B7CEC1A7C6AE425CBED0C3E0C7C1B7CEB1D7B7A55C4C656D70656C2D5A69762E637070>

<443A5C4C C4B48555C B3E25C32C7D0B1E25CBCB3B0E8C7C1B7CEC1A7C6AE425CBED0C3E0C7C1B7CEB1D7B7A55C4C656D70656C2D5A69762E637070> /* */ /* LZWIN.C : Lempel-Ziv compression using Sliding Window */ /* */ #include "stdafx.h" #include "Lempel-Ziv.h" 1 /* ํ๋ฅผ์ดˆ๊ธฐํ™” */ void LZ::init_queue(void) front = rear = 0; /* ํ๊ฐ€๊ฝ‰์ฐผ์œผ๋ฉด 1 ์„๋˜๋Œ๋ฆผ */ int LZ::queue_full(void)

More information

Chapter_06

Chapter_06 ํ”„๋กœ๊ทธ๋ž˜๋ฐ 1 1 Chapter 6. Functions and Program Structure April, 2016 Dept. of software Dankook University http://embedded.dankook.ac.kr/~baeksj ์ด์žฅ์˜๊ฐ•์˜๋ชฉํ‘œ 2 ๋ฌธ์ž์˜์ž…๋ ฅ๋ฐฉ๋ฒ•์„์ดํ•ดํ•œ๋‹ค. ์ค‘์ฒฉ๋œ if๋ฌธ์„์ดํ•ดํ•œ๋‹ค. while ๋ฐ˜๋ณต๋ฌธ์˜์‚ฌ์šฉ๋ฒ•์„์ตํžŒ๋‹ค. do ๋ฐ˜๋ณต๋ฌธ์˜์‚ฌ์šฉ๋ฒ•์„์ตํžŒ๋‹ค.

More information

<4D F736F F F696E74202D D20B9AEC0DABFAD2C20BDBAC6AEB8B2B0FA20C6C4C0CF20C0D4C3E2B7C2>

<4D F736F F F696E74202D D20B9AEC0DABFAD2C20BDBAC6AEB8B2B0FA20C6C4C0CF20C0D4C3E2B7C2> 2015-1 5. ๋ฌธ์ž์—ด (string), ํŒŒ์ผ์ž…์ถœ๋ ฅ March 9, 2015 Advanced Networking Technology Lab. (YU-ANTL) Dept. of Information & Comm. Eng, College of Engineering, Yeungnam University, KOREA (Tel : +82-53-810-2497; Fax

More information

์ œ1์žฅ Unix๋ž€ ๋ฌด์—‡์ธ๊ฐ€?

์ œ1์žฅ  Unix๋ž€ ๋ฌด์—‡์ธ๊ฐ€? 1 12 ์žฅํŒŒ์ดํ”„ 2 12.1 ํŒŒ์ดํ”„ ํŒŒ์ดํ”„์›๋ฆฌ $ who sort ํŒŒ์ดํ”„ 3 ๋ฌผ์„๋ณด๋‚ด๋Š”์ˆ˜๋„ํŒŒ์ดํ”„์™€๋น„์Šท ํ•œํ”„๋กœ์„ธ์Šค๋Š”์“ฐ๊ธฐ์šฉํŒŒ์ผ๋””์Šคํฌ๋ฆฝํ„ฐ๋ฅผ์ด์šฉํ•˜์—ฌํŒŒ์ดํ”„์—๋ฐ์ดํ„ฐ๋ฅผ๋ณด๋‚ด๊ณ  ( ์“ฐ๊ณ  ) ๋‹ค๋ฅธํ”„๋กœ์„ธ์Šค๋Š”์ฝ๊ธฐ์šฉํŒŒ์ผ๋””์Šคํฌ๋ฆฝํ„ฐ๋ฅผ์ด์šฉํ•˜์—ฌ๊ทธํŒŒ์ดํ”„์—์„œ๋ฐ์ดํ„ฐ๋ฅผ๋ฐ›๋Š”๋‹ค ( ์ฝ๋Š”๋‹ค ). ํ•œ๋ฐฉํ–ฅ (one way) ํ†ต์‹  ํŒŒ์ดํ”„์ƒ์„ฑ ํŒŒ์ดํ”„๋Š”๋‘๊ฐœ์˜ํŒŒ์ผ๋””์Šคํฌ๋ฆฝํ„ฐ๋ฅผ๊ฐ–๋Š”๋‹ค. ํ•˜๋‚˜๋Š”์“ฐ๊ธฐ์šฉ์ด๊ณ ๋‹ค๋ฅธํ•˜๋‚˜๋Š”์ฝ๊ธฐ์šฉ์ด๋‹ค.

More information

<4D F736F F F696E74202D FC6C4C0CF20C0D4C3E2B7C2205BC8A3C8AF20B8F0B5E55D>

<4D F736F F F696E74202D FC6C4C0CF20C0D4C3E2B7C2205BC8A3C8AF20B8F0B5E55D> ํ•™์Šต๋ชฉํ‘œ ์œ ๋‹‰์Šค์—์„œํŒŒ์ผ์ž…์ถœ๋ ฅ์˜ํŠน์ง•์„์ดํ•ดํ•œ๋‹ค. ์ €์ˆ˜์ค€ํŒŒ์ผ์ž…์ถœ๋ ฅํ•จ์ˆ˜๋ฅผ์‚ฌ์šฉํ• ์ˆ˜์žˆ๋‹ค. ๊ณ ์ˆ˜์ค€ํŒŒ์ผ์ž…์ถœ๋ ฅํ•จ์ˆ˜๋ฅผ์‚ฌ์šฉํ• ์ˆ˜์žˆ๋‹ค. ์ž„์‹œํŒŒ์ผ์„์ƒ์„ฑํ•ดํŒŒ์ผ์ž…์ถœ๋ ฅ์„ํ• ์ˆ˜์žˆ๋‹ค. ํŒŒ์ผ์ž…์ถœ๋ ฅ IT CookBook, ์œ ๋‹‰์Šค์‹œ์Šคํ…œํ”„๋กœ๊ทธ๋ž˜๋ฐ 2/45 ๋ชฉ์ฐจ ์ €์ˆ˜์ค€ํŒŒ์ผ์ž…์ถœ๋ ฅ ํŒŒ์ผ๊ธฐ์ˆ ์ž ํŒŒ์ผ์ƒ์„ฑ๊ณผ์—ด๊ณ ๋‹ซ๊ธฐ ํŒŒ์ผ์ฝ๊ธฐ์™€์“ฐ๊ธฐ ํŒŒ์ผ์˜คํ”„์…‹์ง€์ • ํŒŒ์ผ๊ธฐ์ˆ ์ž๋ณต์‚ฌ ํŒŒ์ผ๊ธฐ์ˆ ์ž์ œ์–ด ํŒŒ์ผ์‚ญ์ œ ๊ณ ์ˆ˜์ค€ํŒŒ์ผ์ž…์ถœ๋ ฅ ํŒŒ์ผํฌ์ธํ„ฐ ํŒŒ์ผ์—ด๊ธฐ์™€๋‹ซ๊ธฐ

More information

4. #include <stdio.h> #include <stdlib.h> int main() { functiona(); } void functiona() { printf("hihi\n"); } warning: conflicting types for functiona

4. #include <stdio.h> #include <stdlib.h> int main() { functiona(); } void functiona() { printf(hihi\n); } warning: conflicting types for functiona ์ด๋ฆ„ : ํ•™๋ฒˆ : A. True or False: ๊ฐ๊ฐํ•ญ๋ชฉ๋งˆ๋‹ค True ์ธ์ง€ False ์ธ์ง€์ ์œผ์„ธ์š”. 1. (Python:) randint ํ•จ์ˆ˜๋ฅผ์‚ฌ์šฉํ•˜๋ ค๋ฉด, random ๋ชจ๋“ˆ์„ import ํ•ด์•ผํ•œ๋‹ค. 2. (Python:) '' (single quote) ๋Š”ํ•œ๊ธ€์ž๋ฅผํ‘œํ˜„ํ• ๋•Œ, (double quote) ๋Š”๋ฌธ์ž์—ด์„ํ‘œํ˜„ํ• ๋•Œ์‚ฌ์šฉํ•œ๋‹ค. B. ๋‹ค์Œ์—๋Ÿฌ๋ฅผ์ˆ˜์ •ํ•˜๋Š”๋ฐฉ๋ฒ•์„์ ์œผ์„ธ์š”.

More information

์ œ 14 ์žฅํฌ์ธํ„ฐํ™œ์šฉ ์œ ์ค€๋ฒ” (JUNBEOM YOO) Ver ๋ณธ๊ฐ•์˜์ž๋ฃŒ๋Š”์ƒ๋Šฅ์ถœํŒ์‚ฌ์˜ PPT ๊ฐ•์˜์ž๋ฃŒ ๋ฅผ๊ธฐ๋ฐ˜์œผ๋กœ์ œ์ž‘๋˜์—ˆ์Šต๋‹ˆ๋‹ค.

์ œ 14 ์žฅํฌ์ธํ„ฐํ™œ์šฉ ์œ ์ค€๋ฒ” (JUNBEOM YOO) Ver ๋ณธ๊ฐ•์˜์ž๋ฃŒ๋Š”์ƒ๋Šฅ์ถœํŒ์‚ฌ์˜ PPT ๊ฐ•์˜์ž๋ฃŒ ๋ฅผ๊ธฐ๋ฐ˜์œผ๋กœ์ œ์ž‘๋˜์—ˆ์Šต๋‹ˆ๋‹ค. ์ œ 14 ์žฅํฌ์ธํ„ฐํ™œ์šฉ ์œ ์ค€๋ฒ” (JUNBEOM YOO) Ver. 2.0 jbyoo@konkuk.ac.kr http://dslab.konkuk.ac.kr ๋ณธ๊ฐ•์˜์ž๋ฃŒ๋Š”์ƒ๋Šฅ์ถœํŒ์‚ฌ์˜ PPT ๊ฐ•์˜์ž๋ฃŒ ๋ฅผ๊ธฐ๋ฐ˜์œผ๋กœ์ œ์ž‘๋˜์—ˆ์Šต๋‹ˆ๋‹ค. ์ด๋ฒˆ์žฅ์—์„œํ•™์Šตํ• ๋‚ด์šฉ ์ด์ค‘ํฌ์ธํ„ฐ๋ž€๋ฌด์—‡์ธ๊ฐ€? ํฌ์ธํ„ฐ๋ฐฐ์—ด ํ•จ์ˆ˜ํฌ์ธํ„ฐ ๋‹ค์ฐจ์›๋ฐฐ์—ด๊ณผํฌ์ธํ„ฐ void ํฌ์ธํ„ฐ ํฌ์ธํ„ฐ๋Š”๋‹ค์–‘ํ•œ์šฉ๋„๋กœ์œ ์šฉํ•˜๊ฒŒํ™œ์šฉ๋ ์ˆ˜์žˆ์Šต๋‹ˆ๋‹ค. 2 ์ด์ค‘ํฌ์ธํ„ฐ

More information

๊ณ ๊ธ‰ ํ”„๋กœ๊ทธ๋ž˜๋ฐ ์„ค๊ณ„

๊ณ ๊ธ‰ ํ”„๋กœ๊ทธ๋ž˜๋ฐ ์„ค๊ณ„ UNIT 09 ํ‘œ์ค€ I/O ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ ๊ด‘์šด๋Œ€ํ•™๊ต๋กœ๋ด‡ SW ๊ต์œก์› ์ตœ์ƒํ›ˆ ์‹œ์Šคํ…œํ˜ธ์ถœ vs ํ‘œ์ค€ I/O ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌํ•จ์ˆ˜ 2 Application code read write printf scanf Standard I/O Library buffer read, write User System Call System Buffer (buffer cache) Kernel sync

More information

(Asynchronous Mode) ( 1, 5~8, 1~2) & (Parity) 1 ; * S erial Port (BIOS INT 14H) - 1 -

(Asynchronous Mode) ( 1, 5~8, 1~2) & (Parity) 1 ; * S erial Port (BIOS INT 14H) - 1 - (Asynchronous Mode) - - - ( 1, 5~8, 1~2) & (Parity) 1 ; * S erial Port (BIOS INT 14H) - 1 - UART (Univ ers al As y nchronous Receiver / T rans mitter) 8250A 8250A { COM1(3F8H). - Line Control Register

More information

Microsoft PowerPoint - 10์žฅ ๋ฌธ์ž์—ด pptx

Microsoft PowerPoint - 10์žฅ ๋ฌธ์ž์—ด pptx C ํ”„๋กœ๊ทธ๋ž˜๋ฐ๋ฐ์‹ค์Šต 10. ๋ฌธ์ž์—ด ์„ธ์ข…๋Œ€ํ•™๊ต ๋ชฉ์ฐจ 1) ๋ฌธ์ž์—ด์ด๋ž€? 2) ๋ฌธ์ž์—ด๊ณผํฌ์ธํ„ฐ 3) ๋ฌธ์ž์—ด์˜๋ฐฐ์—ด 4) ๋ฌธ์ž์—ด์ฒ˜๋ฆฌํ•จ์ˆ˜ 5) ๋ฌธ์ž์—ด๋ฐ๋ฌธ์ž์ž…์ถœ๋ ฅ 2 1) ๋ฌธ์ž์—ด์ด๋ž€ ๋ฌธ์ž๋ฐฐ์—ด ( ๋ณต์Šต ) ์›์†Œ๊ฐ€๋ฌธ์ž์ธ๋ฐฐ์—ด ๊ฐ๋ฐฐ์—ด์›์†Œ๋ฅผํ•˜๋‚˜์˜๋‹จ์œ„๋กœ์ฒ˜๋ฆฌ : ์ดˆ๊ธฐํ™”, ์ž…์ถœ๋ ฅ char str[8] = {'H','e','l','l','o'}; // ๋ฌธ์ž๋กœ์ดˆ๊ธฐํ™” int i; for (i=0

More information

10.

10. 10. 10.1 10.2 Library Routine: void perror (char* str) perror( ) str Error 0 10.3 10.3 int fd; /* */ fd = open (filename, ) /*, */ if (fd = = -1) { /* */ } fcnt1 (fd, ); /* */ read (fd, ); /* */ write

More information

Microsoft PowerPoint - 08_(C_Programming)_(Korean)_Preprocessing

Microsoft PowerPoint - 08_(C_Programming)_(Korean)_Preprocessing C Programming ์ „์ฒ˜๋ฆฌ (Preprocessing) Seo, Doo-Ok Clickseo.com clickseo@gmail.com ๋ชฉ ์ฐจ C ์ „์ฒ˜๋ฆฌ๊ธฐ ์กฐ๊ฑด๋ฐ๋ถ„ํ• ์ปดํŒŒ์ผ 2 C ์ „์ฒ˜๋ฆฌ๊ธฐ C ์ „์ฒ˜๋ฆฌ๊ธฐ ๋งคํฌ๋กœ์ƒ์ˆ˜ ๋งคํฌ๋กœํ•จ์ˆ˜ ์กฐ๊ฑด๋ฐ๋ถ„ํ• ์ปดํŒŒ์ผ 3 ์ „์ฒ˜๋ฆฌ (Preprocessing) C ์ „์ฒ˜๋ฆฌ๊ธฐ (1/3) ์›์‹œ์†Œ์ŠคํŒŒ์ผ์„์ปดํŒŒ์ผํ•˜๊ธฐ์ „์—ํ–‰ํ•ด์•ผํ• ์ผ๋ จ์˜์ž‘์—… ์™ธ๋ถ€ํŒŒ์ผํฌํ•จ๊ธฐ๋Šฅ

More information

ๅ•†็”จ

ๅ•†็”จ ๅ•†็”จ %{ /* * line numbering 1 */ int lineno = 1 % \n { lineno++ ECHO ^.*$ printf("%d\t%s", lineno, yytext) $ lex ln1.l $ gcc -o ln1 lex.yy.c -ll day := (1461*y) div 4 + (153*m+2) div 5 + d if a then c :=

More information