Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
C 程式語言 I
Search
Nedval
September 23, 2016
Education
120
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
C 程式語言 I
Nedval
September 23, 2016
More Decks by Nedval
See All by Nedval
if else statement
nedval
0
60
軟體測試與驗證—CI & CU
nedval
0
85
SQL Intro
nedval
0
110
Other Decks in Education
See All in Education
ちいかわを読め
uchi8977
1
350
形骸化しない社内勉強会の取り組み - オーナーシップの作り方 / In-house study session
soudai
PRO
1
290
Sekolah Sabat - Triwulan 3 2026 - Pelajaran 12
hiola
0
11k
セキュリティ担当がいない中小医療機関を院外のRISSはどう支えるべきか / How External RISS Can Help Small Medical Institutions
eller86
1
200
Soluciones al examen de Geografía 2026. JUNIO (Convocatoria Ordinaria)
juanmartin2026
1
10k
私たちはなんでテストするんだっけ? Ver.東北IT物産展2026 in 会津若松
camel_404
3
190
1人 × AI、1か月でここまで作れる ー 数年前の外注換算3.8〜7.4億円・241〜379人月分の作業を、AI費用 約10万円・31日で
frievea
0
490
【新規入学者様】ZEPメタバース校舎ガイド
ainischool
0
140
Portable & Reproducible Research Environments in the Age of AI Agents
denkiwakame
0
730
チームの鏡になるー自分の癖を知ると、チームのパターンが見えてくる@スクフェス仙台
saorimurooka
0
180
オンラインコミュニティ TRY部 体験マニュアル
ytapples613
0
370
AIってなぁに?
kenichiota0711
0
830
Featured
See All Featured
Claude Code どこまでも/ Claude Code Everywhere
nwiizo
67
58k
職位にかかわらず全員がリーダーシップを発揮するチーム作り / Building a team where everyone can demonstrate leadership regardless of position
madoxten
69
65k
Marketing to machines
jonoalderson
1
5.8k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
31
10k
Build your cross-platform service in a week with App Engine
jlugia
234
19k
End of SEO as We Know It (SMX Advanced Version)
ipullrank
3
4.4k
How to Get Subject Matter Experts Bought In and Actively Contributing to SEO & PR Initiatives.
livdayseo
0
200
Paper Plane (Part 1)
katiecoart
PRO
2
11k
Agile Leadership in an Agile Organization
kimpetersen
PRO
0
230
Everyday Curiosity
cassininazir
0
320
The Director’s Chair: Orchestrating AI for Truly Effective Learning
tmiket
1
300
Public Speaking Without Barfing On Your Shoes - THAT 2023
reverentgeek
1
570
Transcript
C 程式語言 by
[email protected]
C 程式語言
C 程式語言 文法(Grammar)
C 程式語言 文法(Grammar) 語法(syntax)
句型 e.g., S + V + O
陳述 (statement)
宣告陳述式 (Declaration Statements)
宣告陳述式 (Declaration Statements) 型態 變數名稱 值 type variable name value
型態 變數名稱 值 type variable name value 讓人容易閱讀的代稱
型態 變數名稱 值 type variable name value 代稱所代表的內容
型態 變數名稱 值 type variable name value 內容的類型
先離題一下 … 聽說最近有部電影很紅
先離題一下 … 聽說最近有部電影很紅 名字是 …
君の名は
your name
your name
your name 讓我們試著把這部電影的名稱用 C 語言表示
your name
your name 名詞
your name 名詞 字串(string)
your name 名詞 字串(string) C 語言中又稱字元陣列
your_name 變數名稱限制: 開頭不能是數字 中間不能空白 … 等 字串(string)
your_name char* 一個變數名稱通常代表兩個特質
your_name char* 空間 值 { 一個變數名稱通常代表兩個特質
your_name char* 空間 值 { 一個變數名稱通常代表兩個特質
your_name char* 這個陳述中,只有宣告了一個代號為 your_name 的空間 裡面可以放字元陣列的值,由於尚未放任何內容進去 因此現在 your_name 裡面沒有任何東西 如同電影「你的名字」一樣
在你進電影院前不知道「你的名字」到底是什麼
your_name char* 假如,我們看完電影了,已經知道名字到底是什麼 我們要怎麼放到 your_name 這個空間呢?
your_name char* ... 假如這是主角的名字 它是字串型態
your_name char* "..." 字串型態的內容應放在雙引號中
your_name char* "..." 至於你的名字到底叫什麼?
your_name char* "..." 就請大家進影院看啦~
your_name char* "..." 現在我們有「型態」「變數名稱」以及「值」了 可是 這樣還不是一個完整的陳述 (statement)
your_name char* "..." = 我們需要加一個「這個」
your_name char* "..." = 「這個」是什麼?
your_name char* "..." = 等於?
your_name char* "..." = 等於? NO!!!
What?
蕭煌奇唱過一首歌
那首歌是這樣唱的 …
眼前的等於不是等於~ 你說的等號是什麼等號?
= 在 C 以及多數程式語言中 一個等號稱為:賦值(assign)
= 在 C 以及多數程式語言中 一個等號稱為:賦值 assign 意即賦予等號左邊的空間擁有右邊的值
= 在 C 以及多數程式語言中 一個等號稱為:賦值 assign 意即賦予等號左邊的空間擁有右邊的值
例句
My name is Jrting
My name is Jrting 變數名稱
My name is Jrting 變數名稱 my_name
My name is Jrting 賦值 my_name
My name is Jrting 賦值 = my_name
My name is Jrting 型態:字串 = my_name
My name is Jrting 型態:字串 char* "" = my_name
My name is Jrting 值 char* "Jrting" = my_name
My name is Jrting char* "Jrting" = my_name
結束了嗎?
還沒~
你忘了一件事…
英文老師說句子的結尾要句點
My name is Jrting. char* my_name = "Jrting" Important !!!
My name is Jrting. char* my_name = "Jrting"; Important !!!
上機練習