1 / 12

ENG2116 การโปรแกรมคอมพิวเตอร์ (C programming )

ENG2116 การโปรแกรมคอมพิวเตอร์ (C programming ). ไกรฤกษ์ เชยชื่น. หัวข้อเนื้อหา. การเขียนโปรแกรมพื้นฐาน Variable, Operator, Input, Output Control statement, array Pointer, Function, Structure Preprocessor, Directive and Macro File การเขียนโปแกรมขึ้นสูง Serial port programming

Download Presentation

ENG2116 การโปรแกรมคอมพิวเตอร์ (C programming )

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. ENG2116 การโปรแกรมคอมพิวเตอร์(C programming) ไกรฤกษ์ เชยชื่น

  2. หัวข้อเนื้อหา • การเขียนโปรแกรมพื้นฐาน • Variable, Operator, Input, Output • Control statement, array • Pointer, Function, Structure • Preprocessor, Directive and Macro • File • การเขียนโปแกรมขึ้นสูง • Serial port programming • Window programming

  3. หนังสือที่ใช้ • หนังสือหลัก(แนะนำให้ซื้อ) • อรพิน ประวัติบริสุทธิ์,“คู่มือเรียนภาษาซี ฉบับปรับปรุง พิมพ์ครั้งที่ 10,” สำนักพิมพ์ โปรวิชัน. • หนังสือเสริม • โอภาส เอี่ยมสิริวงศ์, “การเขียนโปรแกรม ด้วยภาษา C,” สำนักพิมพ์ซีเอ็ดยูเคชัน.

  4. การให้คะแนน • คะแนนในคาบเรียน 50% • ฝึกสอนบรรยาย 2 ชม 10% • งานที่ให้ทำส่งในห้อง(ประมาณ15 ครั้ง, 2 ชม/ครั้ง) 20% • สอบย่อย(ประมาณ 15 ครั้ง, 1ชม/ครั้ง) 20% • คะแนนสอบกลางและปลายภาค 30% • การบ้าน 10% • เช็คชื่อ 10% • แต่งตัวเรียบร้อย • สายไม่เกิน 30 นาที

  5. การส่งการบ้านและงานที่ให้ทำในห้องการส่งการบ้านและงานที่ให้ทำในห้อง • ให้ส่งมาที่ email • kairoek.ch@gmail.com • www.st.kmutt.ac.th/~s8530007

  6. แนะนำภาษา C • คิดค้นโดย Dennis Ritchie ในปี 1972 • มาตรฐานภาษา C ถูกกำหนดโดย American National Standards Institute (ANSI C) • การพัฒนาโปรแกรมด้วยภาษา C เขียนโปรแกรมภาษาซี โดยใช้ Editor แปลภาษา (C compiler) Object file (ตย.test.obj) Executable file (ตย.test.exe) Link Library (เก็บคำสั่งมาตรฐาน)

  7. โครงสร้างภาษา C # include <stdio.h> Main() { printf(“Hello Thailand”); }

  8. โครงสร้างภาษา C # include <stdio.h> Main() { printf(“Hello Thailand”); } • ส่วนหัวของโปรแกรม • แทรกชื่อไฟล์ที่เก็บฟังก์ชันมาตรฐานของภาษา C • มีรูปแบบ 2 แบบ • #include <stdio.h> • #include”stdio..h”

  9. โครงสร้างภาษา C # include <stdio.h> Main() { printf(“Hello Thailand”); } ส่วนฟังก์ชันหลัก - อาจเขียนในรูปแบบนี้ main() หรือ void main(void) หรือ void main() - void หมายถึง ค่าว่างเปล่า (Null)

  10. โครงสร้างภาษา C # include <stdio.h> Main() { printf(“Hello Thailand”); } • ส่วนรายละเอียดโปรแกรม • คำสั่งภาษา C จะอยู่ใน เครื่องหมาย { และ } • printf() คือคำสั่งที่อยู่ใน stdio.hใช้แสดงข้อความที่หน้าจอ

  11. แนะนำโปรแกรม Microsoft visual C++ version 6 (VC6)

  12. การบ้าน เขียนวิธีการใช้งาน compiler ของ turbo c++ โปรแกรม Download ได้ที่ http://dn.codegear.comarticle/21751 หรือ ค้นหาจาก Google โดยใช้คำว่า “antique turbo c++” ให้ อธิบายการติดตั้ง โปรแกรมturbo c++ ให้ อธิบายการสร้าง test.exe (โปรแกรมที่ให้ทำในห้องวันนี้)

More Related