商用

Size: px
Start display at page:

Download "商用"

Transcription

1 商用

2

3 %{ /* * line numbering 1 */ int lineno = 1 % \n { lineno++ ECHO ^.*$ printf("%d\t%s", lineno, yytext)

4 $ 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 := 1 while (c) do c := c - 1 $./ln1 < data.p 1 day := (1461*y) div 4 + (153*m+2) div 5 + d 3 if a then c := 1 5 while (c) 6 do c := c - 1

5 %{ /* * line numbering 2 */ int lineno = 0 % ^.*\n printf("%d\t%s", ++lineno, yytext) 1 day := (1461*y) div 4 + (153*m+2) div 5 + d 2 3 if a then c := while (c) 6 do c := c - 1 %{ /* * word count */ int nchar, nword, nline % \n ++nchar, ++nline [^ \t\n]+ ++nword, nchar += yyleng. ++nchar

6 int main(void) { yylex() printf("%d\t%d\t%d\n", nchar, nword, nline) return

7 $ wc data.p data.p %{ #include <stdio.h> #include <ctype.h> % %token DIGIT line : expr '\n' { putchar('\n') expr : expr '+' term { putchar('+') expr '-' term { putchar('-') term term : DIGIT { printf("%d", yylval) int yylex() { int c while (1) { c = getchar() if (c == ' ' c == '\t') else if (isdigit(c)) {

8 yylval = c - '0' return DIGIT else return c int main() { if (yyparse() == 0) printf("!\n\n") else printf("!\n\n")

9 $ yacc in2po-rec1.y $ gcc -o in2po-rec1 y.tab.c -ly $./in2po-rec ! %{ #include <stdio.h> #include <ctype.h> % %token DIGIT line : expr '\n' { putchar('\n') expr : expr '+' term { putchar('+') expr '-' term { putchar('-') term term : DIGIT { printf("%d", yylval)

10 int main() { if (yyparse() == 0) printf("!\n\n") else printf("!\n\n") %{ #include "in2po-rec2.tab.h" % [ \t]+ [0-9] { yylval = yytext[0] - '0' return DIGIT [+\-\n] return yytext[0] #endif #define DIGIT 258 #if! defined (YYSTYPE) &&! defined (YYSTYPE_IS_DECLARED) typedef int YYSTYPE

11 $ lex in2po-rec2.l $ bison -d in2po-rec2.y $ gcc -o in2po-rec2 lex.yy.c in2po-rec2.tab.c -ll -ly $./in2po-rec ! %{ #include <stdio.h>

12 #include <ctype.h> % %token DIGIT line : expr '\n' { printf("%d\n", $1) expr : expr '+' term { $$ = $1 + $3 expr '-' term { $$ = $1 - $3 term term : DIGIT { $$ = $1 int yylex() { int c while (1) { c = getchar() if (c == ' ' c == '\t') else if (isdigit(c)) { yylval = c - '0' return DIGIT else return c int main() { if (yyparse() == 0) printf("!\n\n") else printf("!\n\n")

13 $ yacc calc.y $ gcc -o calc y.tab.c -ly $./calc ! day := (1461*y) div 4 + (153*m+2) div 5 + d if a then c := 1 while (c) do c := c - 1 %{ /* * */ #include <string.h> #include "y.tab.h" %

14 delim [ \t\n] ws {delim+ letter [A-Za-z] digit [0-9] id {letter({letter {digit)* number {digit+(\.{digit+)?(e[+\-]?{digit+)? {ws ":=" return(assign) div return(div) mod return(mod) if return(if) then return(then) while return(while) do return(do) {id { strcpy(yylval.lexeme, yytext) return(id) {number { strcpy(yylval.lexeme, yytext) return(num). return(yytext[0]) %{ /* * */

15 #include <stdio.h> #include <string.h> char *tmp_lbl1, *tmp_lbl2 % %union { char lexeme[10] %start list %token ID NUM DIV MOD ASSIGN IF THEN WHILE DO list : list '' stmt stmt stmt : ID ASSIGN { printf("\tlvalue\t%s\n", $1.lexeme) expr { printf("\t:=\n") IF expr { tmp_lbl1 = new_lbl_no() printf("\tgofalse\t%s\n", tmp_lbl1) THEN stmt { printf("label\t%s\n", tmp_lbl1) WHILE { tmp_lbl1 = new_lbl_no() printf("label\t%s\n", tmp_lbl1) expr { tmp_lbl2 = new_lbl_no() printf("\tgofalse\t%s\n", tmp_lbl2) DO stmt { printf("\tgoto\t%s\n", tmp_lbl1) printf("label\t%s\n", tmp_lbl2) expr : expr '+' term { printf("\t+\n") expr '-' term { printf("\t-\n") term term : term '*' factor { printf("\t*\n") term '/' factor { printf("\t/\n") term DIV factor { printf("\tdiv\n") term MOD factor { printf("\tmod\n")

16 factor factor : '(' expr ')' ID { printf("\trvalue\t%s\n", $1.lexeme) NUM { printf("\tpush\t%s\n", $1.lexeme) char* new_lbl_no(void) { static int lbl_no = 0 char buf[4] int i, quot char *lbl_header lbl_header = (char *)malloc(5) strcpy(lbl_header, "lbl_") buf[3] = '\0' quot = lbl_no++ for (i = 2 - (quot / 10) i >= 0 i--) { buf[i] = '0' + quot % 10 quot = quot / 10 return((char *)strcat(lbl_header, buf)) int main(void) { printf("\ncompilation for Abstract Stack Machine Started...\n\n") printf("\nassembly code for Abstract Stack Machine follows...\n\n") if (yyparse() == 0) printf("\n\ncompilation for Abstract Stack Machine Completed!\n") else printf("\n\ncompilation for Abstract Stack Machine Failed!\n") $ lex stack-m.l $ yacc -d stack-m.y $ gcc -o stack-m lex.yy.c y.tab.c -ll -ly

17 ./stack-m < data.p > data.asm Compilation for Abstract Stack Machine Started... Assembly code for Abstract Stack Machine follows... label label label lvalue day push 1461 rvalue y * push 4 div push 153 rvalue m * push 2 + push 5 div + rvalue d + := rvalue a gofalse lbl_000 lvalue c push 1 := lbl_000 lbl_001 rvalue c gofalse lbl_002 lvalue c rvalue c push 1 - := goto lbl_001 lbl_002

18 Compilation for Abstract Stack Machine Completed!

lex-yacc-tutorial.hwp

lex-yacc-tutorial.hwp 컴파일러 구성을 위한 대표적 소프트웨어 도구인 Lex(또는 Flex)와 Yacc(또는 Bison) 입문: Windows 환경에서 김도형(성신여자대학교 IT학부) 0. 소개 (1) Lex와 Yacc은 무엇인가? 컴파일러의 구성을 도와주는 대표적인 소프트웨어 도구들이다. 원래 UNIX의 산실인 벨 연구소(AT&T Bell Laboratories)에서 UNIX 시스템의

More information

(3) Windows 운영체제에 GNU C 컴파일러와 Flex, Bison 설치하기 적용된 Windows 운영체제는 32비트용 Windows 7이나, 다른버전에서도유사할것으로본다. 먼저 GNU C 컴파일러를설치한다. 이것을설치하는편한방법중하나가유명한무료 C/C++ 프로

(3) Windows 운영체제에 GNU C 컴파일러와 Flex, Bison 설치하기 적용된 Windows 운영체제는 32비트용 Windows 7이나, 다른버전에서도유사할것으로본다. 먼저 GNU C 컴파일러를설치한다. 이것을설치하는편한방법중하나가유명한무료 C/C++ 프로 컴파일러구성을위한대표적소프트웨어도구인 Lex( 또는 Flex) 와 Yacc( 또는 Bison) 입문 : Windows 환경에서 김도형 ( 성신여자대학교 IT 학부 ) 0. 소개 (1) Lex 와 Yacc 은무엇인가? 컴파일러의구성을도와주는대표적인소프트웨어도구들이다. 원래 UNIX의산실인벨연구소 (AT&T Bell Laboratories) 에서 UNIX 시스템의유틸리티

More information

컴파일러

컴파일러 YACC 응용예 Desktop Calculator 7/23 Lex 입력 수식문법을위한 lex 입력 : calc.l %{ #include calc.tab.h" %} %% [0-9]+ return(number) [ \t] \n return(0) \+ return('+') \* return('*'). { printf("'%c': illegal character\n",

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

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

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

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

EA0015: 컴파일러

EA0015: 컴파일러 4 Flex 무엇을공부하나? " 어휘분석기 (lexical analyzer 혹은 scanner)" 는다음과같은과정을거쳐서프로그램된다. 1 토큰정의, 2 정규식으로표현, 3 NFA로변환, 4 DFA로변환, 5 프로그램작성 위과정은앞장에서배운바와같이기계적으로이루어질수있다. "Flex(Fast Lexical Analyzer)" 는컴파일러개발자를위하여위과정을자동으로처리해주는도구이다.

More information

1. 27 (token descriptions) (regular expressions), grep egrep.. C. 1),., C (expressions), (statements), (declarations), (blocks) (procedures). (parsing

1. 27 (token descriptions) (regular expressions), grep egrep.. C. 1),., C (expressions), (statements), (declarations), (blocks) (procedures). (parsing (lex) (yacc). (object code) C. (unit).. C,,,,. ( ) (lexical analysis) (lexing). C (routine). (lexical analyzer) (lexer) (scanner). (lex specification). 1. 27 (token descriptions) (regular expressions),

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 기초특강 종합과제 과제내용 구조체를이용하여교과목이름과코드를파일로부터입력받아관리 구조체를이용하여학생들의이름, 학번과이수한교과목의코드와점수를파일로부터입력 학생개인별총점, 평균계산 교과목별이수학생수, 총점및평균을계산 결과를파일에저장하는프로그램을작성 2 Makefile OBJS = score_main.o score_input.o score_calc.o score_print.o

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

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

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

歯9장.PDF

歯9장.PDF 9 Hello!! C printf() scanf() getchar() putchar() gets() puts() fopen() fclose() fprintf() fscant() fgetc() fputs() fgets() gputs() fread() fwrite() fseek() ftell() I/O 2 (stream) C (text stream) : `/n'

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

11장 포인터

11장 포인터 Dynamic Memory and Linked List 1 동적할당메모리의개념 프로그램이메모리를할당받는방법 정적 (static) 동적 (dynamic) 정적메모리할당 프로그램이시작되기전에미리정해진크기의메모리를할당받는것 메모리의크기는프로그램이시작하기전에결정 int i, j; int buffer[80]; char name[] = data structure"; 처음에결정된크기보다더큰입력이들어온다면처리하지못함

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

프로그램을 학교 등지에서 조금이라도 배운 사람들을 위한 프로그래밍 노트 입니다. 저 역시 그 사람들 중 하나 입니다. 중고등학교 시절 학교 도서관, 새로 생긴 시립 도서관 등을 다니며 책을 보 고 정리하며 어느정도 독학으르 공부하긴 했지만, 자주 안하다 보면 금방 잊어

프로그램을 학교 등지에서 조금이라도 배운 사람들을 위한 프로그래밍 노트 입니다. 저 역시 그 사람들 중 하나 입니다. 중고등학교 시절 학교 도서관, 새로 생긴 시립 도서관 등을 다니며 책을 보 고 정리하며 어느정도 독학으르 공부하긴 했지만, 자주 안하다 보면 금방 잊어 개나리 연구소 C 언어 노트 (tyback.egloos.com) 프로그램을 학교 등지에서 조금이라도 배운 사람들을 위한 프로그래밍 노트 입니다. 저 역시 그 사람들 중 하나 입니다. 중고등학교 시절 학교 도서관, 새로 생긴 시립 도서관 등을 다니며 책을 보 고 정리하며 어느정도 독학으르 공부하긴 했지만, 자주 안하다 보면 금방 잊어먹고 하더라구요. 그래서,

More information

3장 어휘분석

3장 어휘분석 Video & Image VIPL Processing Lab. Compiler Construction 한국방송통신대학교컴퓨터과학과출석수업 제 2012-2 공학박사김명진 (HCI & 지능형로봇연구소 ) 숭실대학교연구교수 컴파일러교재구성 2장 : 형식언어와오토마타 3장 : 어휘분석 4장 : Contex-free 언어와푸시다운오토마타 5장 : 구문분석 2 어휘분석

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

OCaml

OCaml OCaml 2009.. (khheo@ropas.snu.ac.kr) 1 ML 2 ML OCaml INRIA, France SML Bell lab. & Princeton, USA nml SNU/KAIST, KOREA 3 4 (let) (* ex1.ml *) let a = 10 let add x y = x + y (* ex2.ml *) let sumofsquare

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

<C1D6BFE4BDC7C7D0C0DA5FC6EDC1FDBFCF28B4DCB5B5292E687770>

<C1D6BFE4BDC7C7D0C0DA5FC6EDC1FDBFCF28B4DCB5B5292E687770> 유형원 柳 馨 遠 (1622~1673) 1) 유형원 연보 年 譜 2) 유형원 생애 관련 자료 1. 유형원柳馨遠(1622~1673) 생애와 행적 1) 유형원 연보年譜 본관 : 문화文化, 자 : 덕부德夫, 호 : 반계磻溪 나이 / 연도 8 연보 주요 행적지 1세(1622, 광해14) * 서울 정릉동貞陵洞(정동) 출생 2세(1623, 인조1) * 아버지 흠欽+心

More information

시편강설-경건회(2011년)-68편.hwp

시편강설-경건회(2011년)-68편.hwp 30 / 독립개신교회 신학교 경건회 (2011년 1학기) 시편 68편 강해 (3) 시온 산에서 하늘 성소까지 김헌수_ 독립개신교회 신학교 교장 개역 19 날마다 우리 짐을 지시는 주 곧 우리의 구원이신 하나님을 찬송할지 로다 20 하나님은 우리에게 구원의 하나님이시라 사망에서 피함이 주 여호와께로 말미암 거니와 21 그 원수의 머리 곧 그 죄과에 항상 행하는

More information

untitled

untitled 년도연구개발비 년도매출액 년도광고선전비 년도매출액 년도 각 기업의 매출액 년도 산업전체의 매출액 년도말 고정자산 년도말 총자산 년도연구개발비 년도매출액 년도광고선전비 년도매출액 년도 각 기업의 매출액 년도 산업전체의 매출액 년도말 고정자산 년도말 총자산 년도연구개발비 년도매출액 년도광고선전비 년도매출액 년도각기업의매출액 년도 산업전체의 매출액

More information

정 관

정         관 정 관 (1991. 6. 3.전문개정) (1991. 10. 18. 개 정) (1992. 3. 9. 개 정) (1994. 2. 24. 개 정) (1995. 6. 1. 개 정) (1997. 3. 14. 개 정) (1997. 11. 21. 개 정) (1998. 3. 10. 개 정) (1998. 7. 7. 개 정) (1999. 8. 1. 개 정) (1999. 9.

More information

/chroot/lib/ /chroot/etc/

/chroot/lib/ /chroot/etc/ 구축 환경 VirtualBox - Fedora 15 (kernel : 2.6.40.4-5.fc15.i686.PAE) 작동 원리 chroot유저 ssh 접속 -> 접속유저의 홈디렉토리 밑.ssh의 rc 파일 실행 -> daemonstart실행 -> daemon 작동 -> 접속 유저만의 Jail 디렉토리 생성 -> 접속 유저의.bashrc 의 chroot 명령어

More information

PowerPoint 프레젠테이션

PowerPoint 프레젠테이션 Chapter 13 렉스와야크 01 렉스와야크 02 렉스와야크의입력파일형식 03 플렉스와바이슨설치방법 04 플렉스사용법 05 바이슨사용법 렉스와야크의개념에대해이해할수있다. 렉스의입력파일형식과야크의입력파일형식에대해이해할수있다. 플렉스와바이슨의설치방법에대해이해할수있다. 플렉스사용법에대해이해할수있다. 바이슨사용법에대해이해할수있다. 13.1 렉스와야크 프로그래밍언어와컴퓨터구조가다양해짐에따라

More information

5.스택(강의자료).key

5.스택(강의자료).key CHP 5: https://www.youtube.com/watch?v=ns-r91557ds ? (stack): (LIFO:Last-In First-Out):. D C B C B C B C B (element) C (top) B (bottom) (DT) : n element : create() ::=. is_empty(s) ::=. is_full(s) ::=.

More information

슬라이드 1

슬라이드 1 -Part3- 제 4 장동적메모리할당과가변인 자 학습목차 4.1 동적메모리할당 4.1 동적메모리할당 4.1 동적메모리할당 배울내용 1 프로세스의메모리공간 2 동적메모리할당의필요성 4.1 동적메모리할당 (1/6) 프로세스의메모리구조 코드영역 : 프로그램실행코드, 함수들이저장되는영역 스택영역 : 매개변수, 지역변수, 중괄호 ( 블록 ) 내부에정의된변수들이저장되는영역

More information

C 언어 프로그래밊 과제 풀이

C 언어 프로그래밊 과제 풀이 과제풀이 (1) 홀수 / 짝수판정 (1) /* 20094123 홍길동 20100324 */ /* even_or_odd.c */ /* 정수를입력받아홀수인지짝수인지판정하는프로그램 */ int number; printf(" 정수를입력하시오 => "); scanf("%d", &number); 확인 주석문 가필요한이유 printf 와 scanf 쌍

More information

이번장에서학습할내용 동적메모리란? malloc() 와 calloc() 연결리스트 파일을이용하면보다많은데이터를유용하고지속적으로사용및관리할수있습니다. 2

이번장에서학습할내용 동적메모리란? malloc() 와 calloc() 연결리스트 파일을이용하면보다많은데이터를유용하고지속적으로사용및관리할수있습니다. 2 제 17 장동적메모리와연결리스트 유준범 (JUNBEOM YOO) Ver. 2.0 jbyoo@konkuk.ac.kr http://dslab.konkuk.ac.kr 본강의자료는생능출판사의 PPT 강의자료 를기반으로제작되었습니다. 이번장에서학습할내용 동적메모리란? malloc() 와 calloc() 연결리스트 파일을이용하면보다많은데이터를유용하고지속적으로사용및관리할수있습니다.

More information

PowerPoint 프레젠테이션

PowerPoint 프레젠테이션 Chapter 06 반복문 01 반복문의필요성 02 for문 03 while문 04 do~while문 05 기타제어문 반복문의의미와필요성을이해한다. 대표적인반복문인 for 문, while 문, do~while 문의작성법을 알아본다. 1.1 반복문의필요성 반복문 동일한내용을반복하거나일정한규칙으로반복하는일을수행할때사용 프로그램을좀더간결하고실제적으로작성할수있음.

More information

untitled

untitled - -, (insert) (delete) - - (insert) (delete) (top ) - - (insert) (rear) (delete) (front) A A B top A B C top push(a) push(b) push(c) A B top pop() top A B D push(d) top #define MAX_STACK_SIZE 100 int

More information

Microsoft PowerPoint - Chapter_08.pptx

Microsoft PowerPoint - Chapter_08.pptx 프로그래밍 1 1 Chapter 8. Pointers May, 2016 Dept. of software Dankook University http://embedded.dankook.ac.kr/~baeksj 포인터의개념 (1/6) 2 포인터란 : 다른객체를가리키는변수 객체의메모리주소를저장하는변수 기호적방식 (symbolic way) 으로주소사용 포인터와관련된연산자

More information

Microsoft PowerPoint - Chapter_09.pptx

Microsoft PowerPoint - Chapter_09.pptx 프로그래밍 1 1 Chapter 9. Structures May, 2016 Dept. of software Dankook University http://embedded.dankook.ac.kr/~baeksj 구조체의개념 (1/4) 2 (0,0) 구조체 : 다양한종류의데이터로구성된사용자정의데이터타입 복잡한자료를다루는것을편하게해줌 예 #1: 정수로이루어진 x,

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

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

PowerPoint 프레젠테이션

PowerPoint 프레젠테이션 Web server porting 2 Jo, Heeseung Web 을이용한 LED 제어 Web 을이용한 LED 제어프로그램 web 에서데이터를전송받아타겟보드의 LED 를조작하는프로그램을작성하기위해다음과같은소스파일을생성 2 Web 을이용한 LED 제어 LED 제어프로그램작성 8bitled.html 파일을작성 root@ubuntu:/working/web# vi

More information

PowerPoint 프레젠테이션

PowerPoint 프레젠테이션 C 언어포인터정복하기 16 강. 포인터로자료구조화하기 TAE-HYONG KIM COMPUTER ENG, KIT 2 학습내용 구조체멤버와구조체포인터멤버 다른구조체 ( 변수 ) 를가리키는구조체 ( 변수 ) 연결된리스트 의구성및관리 포인터로 연결된리스트 탐색하기 3 중첩구조체에자료저장하기 중첩된구조체변수에값저장하기 struct person { char PRID[15];

More information

Microsoft PowerPoint - 06_(C_Programming)_(Korean)_Characters_Strings

Microsoft PowerPoint - 06_(C_Programming)_(Korean)_Characters_Strings C Programming 문자와문자열 (Characters and Strings) Seo, Doo-Ok Clickseo.com clickseo@gmail.com 목 차 문자처리 문자열처리 2 문자처리 문자처리 문자분류함수 문자변환함수 문자열처리 3 문자분류함수 (1/3) 문자분류 (Character classification) 함수 : 영문대소문자 영문대소문자로분류되는문자인지여부를확인하는함수

More information

chap10.PDF

chap10.PDF 10 C++ Hello!! C C C++ C++ C++ 2 C++ 1980 Bell Bjarne Stroustrup C++ C C++ C, C++ C C 3 C C++ (prototype) (type checking) C C++ : C++ 4 C C++ (prototype) (type checking) [ 10-1] #include extern

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

02 C h a p t e r Java

02 C h a p t e r Java 02 C h a p t e r Java Bioinformatics in J a va,, 2 1,,,, C++, Python, (Java),,, (http://wwwbiojavaorg),, 13, 3D GUI,,, (Java programming language) (Sun Microsystems) 1995 1990 (green project) TV 22 CHAPTER

More information

PowerPoint 프레젠테이션

PowerPoint 프레젠테이션 @ Lesson 2... ( ). ( ). @ vs. logic data method variable behavior attribute method field Flow (Type), ( ) member @ () : C program Method A ( ) Method B ( ) Method C () program : Java, C++, C# data @ Program

More information

3. 1 포인터란 3. 2 포인터변수의선언과사용 3. 3 다차원포인터변수의선언과사용 3. 4 주소의가감산 3. 5 함수포인터

3. 1 포인터란 3. 2 포인터변수의선언과사용 3. 3 다차원포인터변수의선언과사용 3. 4 주소의가감산 3. 5 함수포인터 - Part2-3 3. 1 포인터란 3. 2 포인터변수의선언과사용 3. 3 다차원포인터변수의선언과사용 3. 4 주소의가감산 3. 5 함수포인터 3.1 포인터란 ü ü ü. ü. ü. ü ( ) ? 3.1 ü. ü C ( ).? ü ü PART2-4 ü ( ) PART3-4 3.2 포인터변수의선언과사용 3.2 포인터 변수의 선언과 사용 (1/8) 포인터 변수의

More information

untitled

untitled 1 hamks@dongguk.ac.kr (goal) (abstraction), (modularity), (interface) (efficient) (robust) C Unix C Unix (operating system) (network) (compiler) (machine architecture) 1 2 3 4 5 6 7 8 9 10 ANSI C Systems

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 - chap-12.pptx

Microsoft PowerPoint - chap-12.pptx 쉽게풀어쓴 C 언어 Express 제 12 장문자와문자열 컴퓨터프로그래밍기초 이번장에서학습할내용 문자표현방법 문자열표현방법 문자열이란무엇인가? 문자열의입출력 문자처리라이브러리함수 표준입출력라이브러리함수 인간은문자를사용하여정보를표현하므로문자열은프로그램에서중요한위치를차지하고있다. 이번장에서는 C 에서의문자열처리방법에대하여자세히살펴볼것이다. 컴퓨터프로그래밍기초 2

More information

Microsoft PowerPoint - chap12-고급기능.pptx

Microsoft PowerPoint - chap12-고급기능.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 - chap10-함수의활용.pptx

Microsoft PowerPoint - chap10-함수의활용.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

1 장 C 언어복습 표준입출력배열포인터배열과포인터함수 const와포인터구조체컴파일러사용방법 C++ 프로그래밍입문

1 장 C 언어복습 표준입출력배열포인터배열과포인터함수 const와포인터구조체컴파일러사용방법 C++ 프로그래밍입문 1 장 C 언어복습 표준입출력배열포인터배열과포인터함수 const와포인터구조체컴파일러사용방법 C++ 프로그래밍입문 1. 표준입출력 표준입출력 입력 : 키보드, scanf 함수 출력 : 모니터, printf 함수문제 : 정수값 2개를입력받고두값사이의값들을더하여출력하라. #include int main(void) int Num1, Num2; int

More information

<4D F736F F F696E74202D20C1A63132B0AD20B5BFC0FB20B8DEB8F0B8AEC7D2B4E7>

<4D F736F F F696E74202D20C1A63132B0AD20B5BFC0FB20B8DEB8F0B8AEC7D2B4E7> 제14장 동적 메모리 할당 Dynamic Allocation void * malloc(sizeof(char)*256) void * calloc(sizeof(char), 256) void * realloc(void *, size_t); Self-Referece NODE struct selfref { int n; struct selfref *next; }; Linked

More information

중간고사

중간고사 중간고사 예제 1 사용자로부터받은두개의숫자 x, y 중에서큰수를찾는알고리즘을의사코드로작성하시오. Step 1: Input x, y Step 2: if (x > y) then MAX

More information

이번장에서학습할내용 문자표현방법 문자열표현방법 문자열이란무엇인가? 문자열의입출력 문자처리라이브러리함수 표준입출력라이브러리함수 인간은문자를사용하여정보를표현하므로문자열은프로그램에서중요한위치를차지하고있다. 이번장에서는 C 에서의문자열처리방법에대하여자세히살펴볼것입니다. 2

이번장에서학습할내용 문자표현방법 문자열표현방법 문자열이란무엇인가? 문자열의입출력 문자처리라이브러리함수 표준입출력라이브러리함수 인간은문자를사용하여정보를표현하므로문자열은프로그램에서중요한위치를차지하고있다. 이번장에서는 C 에서의문자열처리방법에대하여자세히살펴볼것입니다. 2 제 12 장문자와문자열 유준범 (JUNBEOM YOO) Ver. 2.0 jbyoo@konkuk.ac.kr http://dslab.konkuk.ac.kr 본강의자료는생능출판사의 PPT 강의자료 를기반으로제작되었습니다. 이번장에서학습할내용 문자표현방법 문자열표현방법 문자열이란무엇인가? 문자열의입출력 문자처리라이브러리함수 표준입출력라이브러리함수 인간은문자를사용하여정보를표현하므로문자열은프로그램에서중요한위치를차지하고있다.

More information

PowerPoint 프레젠테이션

PowerPoint 프레젠테이션 Development Environment 2 Jo, Heeseung make make Definition make is utility to maintain groups of programs Object If some file is modified, make detects it and update files related with modified one It

More information

강의10

강의10 Computer Programming gdb and awk 12 th Lecture 김현철컴퓨터공학부서울대학교 순서 C Compiler and Linker 보충 Static vs Shared Libraries ( 계속 ) gdb awk Q&A Shared vs Static Libraries ( 계속 ) Advantage of Using Libraries Reduced

More information

<303220C1BEC7D528C1DFB1B9B1B3BCF6BED5B1EEC1F6292E687770>

<303220C1BEC7D528C1DFB1B9B1B3BCF6BED5B1EEC1F6292E687770> 예금, 차명예금, 계좌송금, 계좌이체와 관련된 형법상의 문제점 박 동 률 *77) 목 차 Ⅰ. 머리말 Ⅱ. 예금, 계좌송금, 계좌이체의 민사적 법률관계 Ⅲ. 예금과 횡령죄 Ⅳ. 계좌(현금)송금과 횡령죄 Ⅴ. 계좌이체(전자자금이체)와 형법 Ⅵ. 차명예금과 횡령죄 Ⅶ. 맺음말 Ⅰ. 머리말 소위 삼성특검에서 삼성의 차명예금을 이용한 비자금 조성이 문제된 바 있고

More information

Microsoft PowerPoint - ch09 - 연결형리스트, Stack, Queue와 응용 pm0100

Microsoft PowerPoint - ch09 - 연결형리스트, Stack, Queue와 응용 pm0100 2015-1 프로그래밍언어 9. 연결형리스트, Stack, Queue 2015 년 5 월 4 일 교수김영탁 영남대학교공과대학정보통신공학과 (Tel : +82-53-810-2497; Fax : +82-53-810-4742 http://antl.yu.ac.kr/; E-mail : ytkim@yu.ac.kr) 연결리스트 (Linked List) 연결리스트연산 Stack

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

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

11장 포인터

11장 포인터 쉽게풀어쓴 C 언어 Express 제 12 장문자와문자열 이번장에서학습할내용 문자표현방법 문자열표현방법 문자열이란무엇인가? 문자열의입출력 문자처리라이브러리함수 표준입출력라이브러리함수 인간은문자를사용하여정보를표현하므로문자열은프로그램에서중요한위치를차지하고있다. 이번장에서는 C 에서의문자열처리방법에대하여자세히살펴볼것이다. 문자의중요성 인간한테텍스트는대단히중요하다.

More information

Microsoft PowerPoint - lab14.pptx

Microsoft PowerPoint - lab14.pptx Mobile & Embedded System Lab. Dept. of Computer Engineering Kyung Hee Univ. Keypad Device Control in Embedded Linux HBE-SM5-S4210 에는 16 개의 Tack Switch 를사용하여 4 행 4 열의 Keypad 가장착되어있다. 2 Keypad Device Driver

More information

PowerPoint 프레젠테이션

PowerPoint 프레젠테이션 Web server porting 2 Jo, Heeseung Web 을이용한 LED 제어 Web 을이용한 LED 제어프로그램 web 에서데이터를전송받아타겟보드의 LED 를조작하는프로그램을작성하기위해다음과같은소스파일을생성 2 Web 을이용한 LED 제어 LED 제어프로그램작성 8bitled.html 파일을작성 root@ubuntu:/working/web# vi

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

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

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 - ch 전처리기, 다중 소스파일 pm1015

Microsoft PowerPoint - ch 전처리기, 다중 소스파일 pm1015 2015-1 11-1. 전처리기, 다중소스파일 2015 년 5 월 11 일 교수김영탁 영남대학교공과대학정보통신공학과 (Tel : +82-53-810-2497; Fax : +82-53-810-4742 http://antl.yu.ac.kr/; E-mail : ytkim@yu.ac.kr) Outline 전처리기 (preprocessor) 다중소스파일 헤더파일 함수소스파일

More information

Microsoft PowerPoint - semantics

Microsoft PowerPoint - semantics 제 3 장시맨틱스 (Semantics) Reading Chap 13 숙대창병모 Sep. 2007 1 3.1 Operational Semantics 숙대창병모 Sep. 2007 2 시맨틱스의필요성 프로그램의미의정확한이해 소프트웨어의정확한명세 소프트웨어시스템에대한검증혹은추론 컴파일러혹은해석기작성의기초 숙대창병모 Sep. 2007 3 의미론의종류 Operational

More information

슬라이드 1

슬라이드 1 / 유닉스시스템개요 / 파일 / 프로세스 01 File Descriptor file file descriptor file type unix 에서의파일은단지바이트들의나열임 operating system 은파일에어떤포맷도부과하지않음 파일의내용은바이트단위로주소를줄수있음 file descriptor 는 0 이나양수임 file 은 open 이나 creat 로 file

More information

PowerPoint 프레젠테이션

PowerPoint 프레젠테이션 DEVELOPMENT ENVIRONMENT 2 MAKE Jo, Heeseung MAKE Definition make is utility to maintain groups of programs Object If some file is modified, make detects it and update files related with modified one 2

More information

슬라이드 1

슬라이드 1 3 장. 선행자료 어휘원소, 연산자와 C 시스템 박종혁교수 UCS Lab Tel: 970-6702 Email: jhpark1@seoultech.ac.kr SeoulTech 2019-1 st 프로그래밍입문 (1) 2 목차 1.1 문자와어휘원소 1.2 구문법칙 1.3 주석 1.4 키워드 (Keyword) 1.5 식별자 (Identifier) 1.6 상수 (Integer,

More information

06Àå

06Àå Chapter 5 Chapter 6 Chapter 7 chapter 6 Part 1 6.1 Part 2 Part 3 145 146 Chapter 5 Chapter 6 Chapter 7 Part 1 Part 2 Part 3 147 148 Chapter 5 Chapter 6 Chapter 7 Part 1 Part 2 Part 3 149 150 Chapter 5

More information

Microsoft PowerPoint - chap-07.pptx

Microsoft PowerPoint - chap-07.pptx 쉽게풀어쓴 C 언어 Express 제 7 장반복문 컴퓨터프로그래밍기초 이번장에서학습할내용 반복의개념이해 while 반복문 do-while 반복문 for 반복문 break와 continue 문 반복구조는일련의처리를반복할수있게한다. 반복의개념을먼저이해하고 C에서제공되는 3가지의반복구조에대하여학습한다. 컴퓨터프로그래밍기초 2 반복문 Q) 반복구조는왜필요한가? A)

More information

Microsoft PowerPoint - 3ÀÏ°_º¯¼ö¿Í »ó¼ö.ppt

Microsoft PowerPoint - 3ÀÏ°_º¯¼ö¿Í »ó¼ö.ppt 변수와상수 1 변수란무엇인가? 변수 : 정보 (data) 를저장하는컴퓨터내의특정위치 ( 임시저장공간 ) 메모리, register 메모리주소 101 번지 102 번지 변수의크기에따라 주로 byte 단위 메모리 2 기본적인변수형및변수의크기 변수의크기 해당컴퓨터에서는항상일정 컴퓨터마다다를수있음 short

More information

Microsoft Word - ExecutionStack

Microsoft Word - ExecutionStack Lecture 15: LM code from high level language /* Simple Program */ external int get_int(); external void put_int(); int sum; clear_sum() { sum=0; int step=2; main() { register int i; static int count; clear_sum();

More information

Chapter 4. LISTS

Chapter 4. LISTS 6. 동치관계 (Equivalence Relations) 동치관계 reflexive, symmetric, transitive 성질을만족 "equal to"(=) 관계는동치관계임. x = x x = y 이면 y = x x = y 이고 y = z 이면 x = z 동치관계를이용하여집합 S 를 동치클래스 로분할 동일한클래스내의원소 x, y 에대해서는 x y 관계성립

More information

Line (A) å j a k= i k #define max(a, b) (((a) >= (b))? (a) : (b)) long MaxSubseqSum0(int A[], unsigned Left, unsigned Right) { int Center, i; long Max

Line (A) å j a k= i k #define max(a, b) (((a) >= (b))? (a) : (b)) long MaxSubseqSum0(int A[], unsigned Left, unsigned Right) { int Center, i; long Max 알고리즘설계와분석 (CSE3081-2반 ) 중간고사 (2013년 10월24일 ( 목 ) 오전 10시30분 ) 담당교수 : 서강대학교컴퓨터공학과임인성수강학년 : 2학년문제 : 총 8쪽 12문제 ========================================= < 주의 > 답안지에답을쓴후제출할것. 만약공간이부족하면답안지의뒷면을이용하고반드시답을쓰는칸에답안지의어느쪽의뒷면에답을기술하였는지명시할것.

More information

Chapter #01 Subject

Chapter #01  Subject Device Driver March 24, 2004 Kim, ki-hyeon 목차 1. 인터럽트처리복습 1. 인터럽트복습 입력검출방법 인터럽트방식, 폴링 (polling) 방식 인터럽트서비스등록함수 ( 커널에등록 ) int request_irq(unsigned int irq, void(*handler)(int,void*,struct pt_regs*), unsigned

More information

PowerPoint 프레젠테이션

PowerPoint 프레젠테이션 Network Programming Jo, Heeseung Network 실습 네트워크프로그래밍 멀리떨어져있는호스트들이서로데이터를주고받을수있도록프로그램을구현하는것 파일과는달리데이터를주고받을대상이멀리떨어져있기때문에소프트웨어차원에서호스트들간에연결을해주는장치가필요 이러한기능을해주는장치로소켓이라는인터페이스를많이사용 소켓프로그래밍이란용어와네트워크프로그래밍이랑용어가같은의미로사용

More information

C 프로그래밊 개요

C 프로그래밊 개요 구조체 2009 년 5 월 19 일 김경중 강의계획수정 일자계획 Quiz 실습보강 5 월 19 일 ( 화 ) 구조체 Quiz ( 함수 ) 5 월 21 일 ( 목 ) 구조체저녁 6 시 5 월 26 일 ( 화 ) 포인터 5 월 28 일 ( 목 ) 특강 (12:00-1:30) 6 월 2 일 ( 화 ) 포인터 Quiz ( 구조체 ) 저녁 6 시 6 월 4 일 ( 목

More information

<4D F736F F F696E74202D20C1A63137C0E520B5BFC0FBB8DEB8F0B8AEBFCD20BFACB0E1B8AEBDBAC6AE>

<4D F736F F F696E74202D20C1A63137C0E520B5BFC0FBB8DEB8F0B8AEBFCD20BFACB0E1B8AEBDBAC6AE> 쉽게풀어쓴 C 언어 Express 제 17 장동적메모리와연결리스트 이번장에서학습할내용 동적메모리할당의이해 동적메모리할당관련함수 연결리스트 동적메모리할당에대한개념을이해하고응용으로연결리스트를학습합니다. 동적할당메모리의개념 프로그램이메모리를할당받는방법 정적 (static) 동적 (dynamic) 정적메모리할당 정적메모리할당 프로그램이시작되기전에미리정해진크기의메모리를할당받는것

More information

PowerPoint 프레젠테이션

PowerPoint 프레젠테이션 Sensor Device Jo, Heeseung Sensor 실습 HBE-SM5-S4210 에는근접 / 가속도 / 컴파스센서가장착 각센서들을사용하기위한디바이스드라이버와어플리케이션을작성 2 근접 (Proximity) 센서 HBE-SM5-S4210 Camera Module 근접센서디바이스 근접센서는사물이다른사물에접촉되기이전에가까이접근하였는지를검출할목적으로사용 일반적으로생활에서자동문이나엘리베이터,

More information

13 주차문자열의표현과입출력

13 주차문자열의표현과입출력 13 주차문자열의표현과입출력 문자표현방법 문자열표현방법 문자열이란무엇인가? 문자열의입출력 문자처리라이브러리함수 표준입출력라이브러리함수 C 언어를이용하여문자열을처리하기위해서는문자형의배열이나포인터를사용하게된다. 문자열을처리하는동작으로는단순하게문자열의입력이나출력기능이외에도문자열의복사나치환, 문자열의길이를구하거나문자열을비교하는기능등많은기능을필요로한다. 그러나이러한기능들을모두구현하기란매우까다로우며,

More information

슬라이드 1

슬라이드 1 LEX & YACC An Introduction jbkang @ Aug 2009 Part I. (F)LEX Overview of Lex Automata Revisited 목표 : integer 또는 real number를 인식하는 Finite State Automaton 작성 (단, 소수점 이후에는 숫자가 하나 이상 있도록) accept : 정수 0~9 0~9

More information

<322EBCF8C8AF28BFACBDC0B9AEC1A6292E687770>

<322EBCF8C8AF28BFACBDC0B9AEC1A6292E687770> 연습문제해답 5 4 3 2 1 0 함수의반환값 =15 5 4 3 2 1 0 함수의반환값 =95 10 7 4 1-2 함수의반환값 =3 1 2 3 4 5 연습문제해답 1. C 언어에서의배열에대하여다음중맞는것은? (1) 3차원이상의배열은불가능하다. (2) 배열의이름은포인터와같은역할을한다. (3) 배열의인덱스는 1에서부터시작한다. (4) 선언한다음, 실행도중에배열의크기를변경하는것이가능하다.

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

006 007 007 009 012 012 012 013 013 013 018 019 033 045 051 052 060 066 067 077 083 084 099 108 117 118 122 135 140 141 141 142 143 143 145 148 154 01 006 007 007 009 " # $ % 02 012 012 012 013 013 013

More information

BMP 파일 처리

BMP 파일 처리 BMP 파일처리 김성영교수 금오공과대학교 컴퓨터공학과 학습내용 영상반전프로그램제작 2 Inverting images out = 255 - in 3 /* 이프로그램은 8bit gray-scale 영상을입력으로사용하여반전한후동일포맷의영상으로저장한다. */ #include #include #define WIDTHBYTES(bytes)

More information

PowerPoint 프레젠테이션

PowerPoint 프레젠테이션 7-Segment Device Control - Device driver Jo, Heeseung HBE-SM5-S4210 의 M3 Module 에는 6 자리를가지는 7-Segment 모듈이아래그림처럼실장 6 Digit 7-Segment 2 6-Digit 7-Segment LED controller 16비트로구성된 2개의레지스터에의해제어 SEG_Sel_Reg(Segment

More information

PowerPoint 프레젠테이션

PowerPoint 프레젠테이션 7-Segment Device Control - Device driver Jo, Heeseung HBE-SM5-S4210 의 M3 Module 에는 6 자리를가지는 7-Segment 모듈이아래그림처럼실장 6 Digit 7-Segment 2 6-Digit 7-Segment LED Controller 16비트로구성된 2개의레지스터에의해제어 SEG_Sel_Reg(Segment

More information

IAEA

IAEA 1 '구호천사' 한비야의 이라크에서 보낸 편지 "수돗물 5 일에 한번 나올까 말까" 학교엔 화장실 없어 아무데나 '볼일' "외국인 떠나라" 구호단체도 공격대상 오지 여행가로 유명한 한비야(45)씨는 6 월 16 일부터 이라크 모술에서 2 개월여 구호활동을 벌였다.바그다드 유엔 사무실 폭파사건에 이어 모술에서도 대규모 총격사태가 벌어지자 지난달 말 예정을 2

More information

PowerPoint 프레젠테이션

PowerPoint 프레젠테이션 7-SEGMENT DEVICE CONTROL - DEVICE DRIVER Jo, Heeseung 디바이스드라이버구현 : 7-SEGMENT HBE-SM5-S4210 의 M3 Module 에는 6 자리를가지는 7-Segment 모듈이아래그림처럼실장 6 Digit 7-Segment 2 디바이스드라이버구현 : 7-SEGMENT 6-Digit 7-Segment LED

More information

Microsoft PowerPoint - chap05-제어문.pptx

Microsoft PowerPoint - chap05-제어문.pptx int num; printf( Please enter an integer: "); scanf("%d", &num); if ( num < 0 ) printf("is negative.\n"); printf("num = %d\n", num); 1 학습목표 제어문인,, 분기문에 대해 알아본다. 인 if와 switch의 사용 방법과 사용시 주의사항에 대해 알아본다.

More information

PowerPoint 프레젠테이션

PowerPoint 프레젠테이션 KeyPad Device Control - Device driver Jo, Heeseung HBE-SM5-S4210 에는 16 개의 Tack Switch 를사용하여 4 행 4 열의 Keypad 가장착 4x4 Keypad 2 KeyPad 를제어하기위하여 FPGA 내부에 KeyPad controller 가구현 KeyPad controller 16bit 로구성된

More information

02장.배열과 클래스

02장.배열과 클래스 ---------------- DATA STRUCTURES USING C ---------------- CHAPTER 배열과구조체 1/20 많은자료의처리? 배열 (array), 구조체 (struct) 성적처리프로그램에서 45 명의성적을저장하는방법 주소록프로그램에서친구들의다양한정보 ( 이름, 전화번호, 주소, 이메일등 ) 를통합하여저장하는방법 홍길동 이름 :

More information