Arguments to the main Function and Final Project

Slides:



Advertisements
Similar presentations
Which TV program is the video? 中国达人秀 China’s Got Talent 选秀节目 talent show talent n. 天资;天赋.
Advertisements

國立成功大學工程科學系 Department of Engineering Science -National Cheng Kung University 控制與訊號處理實驗室 Control & Signal Processing Lab MATLAB/Simulink 教學.
提升教學品質研討會 工學院教師教學經驗分享 長庚大學 資訊工程學系 / 醫療機電工程研究所 助理教授 趙一平 2015/04/10.
IFY Parents Meeting 3 December 年12月3日家长会
2007年8月龙星课程 周源源老师课程体会 包云岗 中科院计算所
-CHINESE TIME (中文时间): Free Response idea: 你周末做了什么?
中大系所英語自學小組 負責老師:陳若盈 自學助理:陳瑩珊 2009/3/17.
第1单元 操作系统概论 第一节 绪论 操作系统定义.
图书馆 Library.
:sisu Password:
分組合作學習實作分享 合作學習 學習合作 五福國中 劉怡君 國教輔導團專任輔導員.
Today – Academic Presentation 学术报告
聽障學生的英文教學 台中縣立立新國中 林姉瑤.
2012 Federal Tax Return Due Date : 4/15/2013
Academic Year TFC EFL Data Collection Outline 学年美丽中国英语测试数据收集概述
How can we be a member of the Society? You should finish the following tasks if you want to be a member of the Birdwatching Society.
Leftmost Longest Regular Expression Matching in Reconfigurable Logic
System Administration Practice Homework 2: Shell Programming
闽教版小学英语五年级上册 Unit 7 Making Phone Calls Part A 执教者:福清市东张中心小学 英语组.
第六章 应用程序结构.
簡易 Visual Studio 2010 C++ 使用手冊
第五章 shell 编程 shell 编程的基本过程分为三步: 1. 建立 shell 文件 包含任意多行操作系统命令或shell命令的文本
第 7 章 陣列 (Array).
中国散裂中子源小角谱仪 的实验数据格式与处理算法 报告人:张晟恺 中国科学院高能物理研究所 SCE 年8月18日
C 程式設計— 指標 台大資訊工程學系 資訊系統訓練班.
第十一章 文件 文件概述 文件操作 文件操作实例 本章小结 作业: 练习:
課務組 Curriculum Section
1 Introduction Prof. Lin-Shan Lee.
C 語言簡介 - 2.
Summer English and Data Science
Chinese 101 University of Puget Sound
This Is English 3 双向视频文稿.
Introduction to Multimedia Coding
An Thanking someone for a ride
第九單元 Classes and data abstraction I
重點 資料結構之選定會影響演算法 選擇對的資料結構讓您上天堂 程式.
Lesson 44:Popular Sayings
Gzip 编译及调试 Speaker: Lei Zhao (赵雷) September 13, 2006
簡易 Visual Studio 2005 C++ 使用手冊
Try to write He Mengling Daqu Middle School.
Check In.
Keiser University – Shanghai Campus Keiser大学-上海分校 Access to the JiaoTong University libraries 请使用上海交通大学图书馆.
COMPUTEX 2014 A note given in BCC class on June 4, 2014
1 Introduction Prof. Lin-Shan Lee.
My favorite subject is science.
1 这里填写小标题 平行信息罗列 插入 相关 图片 项目名称 项目名称 项目名称 Input your information here. Make it longer than the title.. 插入 相关 图片 项目名称 项目名称 项目名称 一段描述的语言,长一点,超过一行会比较好看。
SAP Query 建立User Group (SQ03) 建立Infoset (SQ02)
Unit 7 Lesson 20 九中分校 刘秀芬.
National Taiwan University
崑山科技大學 電子工程系 99學年度 學生實務專題成果展
Checking in 入住模块.
Inheritance -II.
Homework 3.
Geographic Information System ─ Practice Class
Compute System Administration Homework 2: Shell Script
第9章 交期管理.
第三章 基本的輸出與輸入函數 (Basic Output & Input Function)
為什麼要考國中教育會考 學生:了解自己的學力水準,並為下一學習階段作準備。
國立清華大學 National Tsing Hua University
專業倫理 (Professional Ethics) 2008 FALL SEMESTER (N3)
怎樣把同一評估 給與在不同班級的學生 How to administer the Same assessment to students from Different classes and groups.
1/18 今天的学习目标 (Today’s Learning Objectives)
code::blocks 與GLUT 程式開發
三年級1200單字 第一冊第1課第1關.
Tree Riddles Kun-Mao Chao (趙坤茂)
Tree Riddles Kun-Mao Chao (趙坤茂)
DDoS A note given in BCC class on May 15, 2013 Kun-Mao Chao (趙坤茂)
熟悉的地方沒有風景 ♫ Turn on your speaker.
熟悉VC++开发环境.
Presentation transcript:

Arguments to the main Function and Final Project Speaker: Yao-Ting Huang Advisor: Kun-Mao Chao National Taiwan University Department of Computer Science & Information Engineering Algorithms and Computational Biology Lab. 2019/6/4

Arguments to main Function (1/2) We may often need to pass arguments to the program upon execution. e.g., In DOS mode, you can type “copy file1.txt file2.txt” to copy a file. Syntax: int main(int argc, char *argv[]) argc: the number of arguments argv: an char array of arguments int main(int argc, char* argv[]){ fprintf(“%d\t”, argc); fprintf(“%s\t”, argv[0]); fprintf(“%s\n”, argv[1]); }

Arguments to main Function (2/2) Suppose this program is compiled as “run.exe” Open the DOS command window. 開始選單->執行->cmd Change to the directory where “run.exe” exists. Type “run Hello” Output is “2 run Hello” Type “run Parameter1 Parameter2” Output is “3 run Parameter1”

Final Project You have to join a group composed of 5 to 7 people. Important dates: Each group should turn in the list of members by 11/25. Each group should submit your proposal for final project by 12/2. In addition, each group should present your proposal at that day. TAs will check the progress of each group at 12/16. Each group should demo the prototype of your project. The final project is due on 12/30. Each group should demo your project and turn in a project report.

Example of A Project Project name: 大樂透開獎預測系統 Project member: 小趙(d1234) 、小莊(d1122) 、小黃(d7788)、小玉(b5678)、小小(b5566) System Functionalities: 可查詢歷次大樂透開獎號碼 可查詢某一特定號碼之開獎次數 可預測下一期某一號碼中獎機率 可判斷下一期某一組合號碼中獎機率 可預測下一期最佳開獎號碼組合 可預測何種包牌組合投資報酬率最高 模擬下一期大樂透開獎結果

Example of A Project 分工情形 程式技巧 小趙負責 小莊負責 查詢歷次大樂透開獎號碼 查詢某一特定號碼之開獎次數 … 需使用檔案IO處理函示 (例如、fprintf與fscanf) 紀錄與查詢歷次大樂透開獎結果

Homework #5 (1/2) Write a program that computes the average grades and sorts the grades of two classes. Your program should input two lists of grades for each class. Your program should output: (1) average grades for each class, and (2) a list of sorted grades of two classes. You can either assume the number of students in each class is fixed or prompt the user to input the number. You can use the sorting function in p.401 in the text book.

Homework #5 (2/2) e.g., Please input grades of the 1st class: 55 45 65 85 75 Please input grades of the 2nd class: 80 70 50 60 40 Output: The average grades of 1st class is: 65 The average grades of 2nd class is: 60 The sorted grades of two classes are: 40 45 50 55 60 65 70 75 80 85 Due date: 11/25.

Outline of Lecture Today A C file program with arguments to main function. Demo of your Homework #4. Please make sure your program is ready to execute.