C C C The Most Beautiful Language and Most Dangerous Language in the Programming World! C 2 C C C 4 C 40 30 10 Project 30 C Project 3 60 Project 40



Similar documents
int *p int a 0x00C7 0x00C7 0x00C int I[2], *pi = &I[0]; pi++; char C[2], *pc = &C[0]; pc++; float F[2], *pf = &F[0]; pf++;

C/C++ - 函数

_汪_文前新ok[3.1].doc

C/C++程序设计 - 字符串与格式化输入/输出

CC213

(\244j\257d\276\307\274\351_ C.indd_70%.pdf)

图书情报2012(2).docx

* +, -.%, * %(/, & 0!

2

"!!!!!!! *!!!!!! )!!!!!! (!!!!!!! " # $ % & # $ % ( # $ % ) * # $ %! " # $!!!!!! &!!!!!! %!!!!!! $!!!!!! #!!!!!! "!!!!!!! " ) ) $ " ) ) % " ) ) & " )

升 温 进 一 步 推 动 了 房 价 的 上 升 近 年 丽 水 城 区 商 品 住 宅 价 格 变 动 情 况 单 位 元 + %

6寸PDF生成工具

《计算机导论》实验教学大纲

,,,, (,, - ;, ;, ;, ;, ;,, - ;, - ) (,, ~ ),,,, (, ),,,, ( ), () () ( ),,,,,,,.,, :.,. (,, ) : ( ), ;( ), ;( ) ;( ), :.,. %(,, ),,,,, (,, - ) :( ) ( )

先生別耍我

FY.DOC

投影片 1

(Microsoft Word - \303D\256w_\244\244\245\370-1.doc)

C/C++ - 字符串与字符串函数

減肥的動力.doc

C/C++ - 文件IO

故宮是從小時候到現在的認知裡一直存在的博物館

ebook8-30

新版 明解C言語入門編

51 C 51 isp 10 C PCB C C C C KEIL

untitled

1 LINUX IDE Emacs gcc gdb Emacs + gcc + gdb IDE Emacs IDE C Emacs Emacs IDE ICE Integrated Computing Environment Emacs Unix Linux Emacs Emacs Emacs Un

Microsoft Word - 博弈圣经



CC213

循经指压疗法

Microsoft Word - HERBRECIPES《中國藥膳》.doc

毛主席的猪

** 状 态 二 亚 健 康 亚 健 康 是 指 处 于 健 康 和 疾 病 两 者 之 间 的 一 种 状 态 即 机 体 内 出 现 某 些 功 能 紊 乱 但 未 影 响 到 行 使 社 会 功 能 主 观 上 有 不 适 感 觉 它 是 人 体 处 于 健 康 和 疾 病 之 间 的 过 渡

C

幻灯片 1

!" # $%& (" " )*+",-. / /-,01-0" 2 3" 4 3" :8; " " < =1&&>." AB & ( C DE&DE F" " " " " " " " " " # GH!# $" IJKLM 0&( F" " 0E &0 " NO P QRS

378高雄市都市計畫說明書

附件1.FIT)

!" # $%& (" " )*+",-. / /-,01-0" 2 3" 4 3" :8; " " < =1&&>." AB & ( C DE&DE F" " " " " " " " " " # GH!# $" IJKLM 0&( F" " 0E &0 " NO P QRS

EK-STM32F

神机制敌太白阴经.PDF

口 的 70% 连 南 县 的 瑶 族. 有 排 瑶 过 山 瑶 排 瑶 6 万 多 人 住 在 三 排 南 岗 i 雨 水 大 麦 山 大 坪 香 坪 盘 石 金 坑 8 个 乡 镇. 形 成 了 占 全 县 面 积 80% 的 聚 居 地 << 连 州 志 } 卷 八 排 瑶 志 曰 在 连 者

!"

PowerPoint 演示文稿

./ /


C++ 程式設計

信 息 按 术 与 当 代 外 交 的 变 革 基 于 计 算 机 系 统 的 信 息 铁 末 的 发 展 信 息 技 术 的 发 展 经 历 了 5 次 大 的 突 破, 即 语 言 的 产 生 文 字 的 创 造 印 刷 术 的 发 明 电 报 电 话 及 广 播 的 使 用 电 子 计 算 机

!

大学计算机基础B.doc

2 政策版 教育部為勗勉軍訓教官落實 育署及大專校院之各分區國防 軍訓工作抱持之高度熱忱 在 102學年度全國績優軍訓教官選拔獲獎名單 高中職組 學生服務及戮力於校園安全維 教育及資源中心完成初審後 校園安全 學生生活輔導及防 護之辛勞 特辦理 102學年 送本部學生事務及特殊教育司 制學生藥物濫用

Transcription:

C C trio@seu.edu.cn C

C C C The Most Beautiful Language and Most Dangerous Language in the Programming World! C 2 C C C 4 C 40 30 10 Project 30 C Project 3 60 Project 40

Week3 C Week5 Week5 Memory & Pointer Week7 (Data structure & Link List) Week9 Interrupt & Device Driver Week11 Coding Style Week11 Week13 ASIX OS Simulator Week13 ASIX Windows GUI Week15 ASIX Windows GUI Week15 ASIX Windows Course Project MS VC++ ASIX OS Simulator ASIX Window ASIX Windows ASIX Windows

ASIX OS Simulator 120

C 1 C (The C Programming Language ) Brian W.Kernighan, Dennis M.Ritchie C Brian W. Kernighan Dennis M. Ritchie C 2 C Primer Plus (C Primer Plus) Stephen Prata Primer Plus C Primer Plus( ) C 3 C (Pointers on C) Kenneth A.Reek C C C 1 C (C Traps and Pitfalls) Andrew Koenig 1985 Bell C C C 2 C (Expert C Programming ) Perter Van Der LinDen C C++ C 3 C (C Programming : Just the Faqs ) Paul S.R.Chisholm c

(1) C/C++ (Programming Embedded Systems in C and C++) Michael Barr (2) C/OS-II (MicroC/OS-II The Real-Time Kernel) Jean J.Labrosse C/OSII C/OSII C/OSII CPU (3) (Embedded Systems Building Blocks ) Jean J.Labrosse / C (1) http://www.csdn.net/ IT (2) C http://ols3.tnc.idv.tw/prg/cpp/ccfaq/ccfaq.html C-FAQ (2004 7 3 ) (3) Programming in C http://www.lysator.liu.se/c/index.html C E

QUIZ 1 a a) An integer b) A pointer to an integer c) A pointer to a pointer to an integer d) 10 An array of integers e) 10 An array of 10 pointers to integers f) A pointer to a function that takes an integer as an argument and returns an integer g) 10 An array of ten pointers to functions that take an integer argument and return an integer

2 static 3 const

4 volatile? 5 a a bit 3 a bit 3

6 0x67a9 0xaa66 ANSI 7 C interrupt interrupt (ISR) interrupt double compute_area (double radius) { double area = PI * radius * radius; printf(" Area = %f", area); return area; }

8 void foo(void) { unsigned int a = 6; int b = -20; (a+b > 6)? puts("> 6") : puts("<= 6"); } 9 C, int a = 5, b = 7, c; c = a+++b;

Answer! Quiz 1 Answer a) int a; // An integer b) int *a; // A pointer to an integer c) int **a; // A pointer to a pointer to an integer d) int a[10]; // An array of 10 integers e) int *a[10]; // An array of 10 pointers to integers f) int (*a)(int); // A pointer to a function a that takes an integer argument and returns an integer g) int (*a[10])(int); // An array of 10 pointers to functions that take an integer argument and return an integer

Quiz 2 Answer C static 1). 2). 3). Quiz 3 Answer const int a; int const a; const int *a; int * const a; int const * a const; a a a a

CONST const const const const bug Quiz 4 Answer volatile volatile 1). 2). (Non-automatic variables) 3).

Quiz 5 Answer #define BIT3 (0x1<<3) static int a; void set_bit3(void) { a = BIT3; } void clear_bit3(void) { a &= ~BIT3; } int *ptr; ptr = (int *)0x67a9; *ptr = 0xaa55; Quiz 6 Answer

Quiz 7 Answer 1). ISR 2). ISR 3). / / / ISR ISR ISR 4). printf() Quiz 8 Answer >6-20 6

Quiz 9 Answer c = a++ + b;, a = 6, b = 7, c = 12 :