SlideShare a Scribd company logo
1 of 2
Download to read offline
ประวัติภาษาซี 
การเริ่มต้นพัฒนาภาษาซีเกิดขึ้นที่เบลล์แล็บส์ของเอทีแอนด์ ทีระหว่าง พ.ศ. 2512–2516 แต่ตามข้อมูลของริตชี ช่วงเวลาที่เกิดความ สร้างสรรค์มากที่สุดคือ พ.ศ. 2515 ภาษานี้ถูกตั้งชื่อว่า "ซี" เพราะ คุณลักษณะต่าง ๆ ต่อยอดมาจากภาษาก่อนหน้าคือ "บี" ซึ่งจากข้อมูล ของเคน ทอมป์สัน (Ken Thompson) กล่าวว่าภาษาบีเป็นรุ่นที่แยกตัว ออกจากภาษาบีซีพีแอลอีกทอดหนึ่ง 
จนมาถึง พ.ศ.2526 Bjarne Stroustrup แห่งห้องปฏิบัติการ เบล (Bell Laboratories) ได้พัฒนาภาษา C++ ขึ้นรายละเอียดและ ความสามารถของ C++ มีส่วนขยายเพิ่มจาก C ที่สาคัญ ๆ ได้แก่ แนวความคิดของการเขียนโปรแกรมแบบกาหนดวัตถุเป้าหมายหรื อแบบ OOP (Object Oriented Programming) ซึ่งเป็นแนวการเขียน โปรแกรมที่เหมาะกับการพัฒนาโปรแกรมขนาดใหญ่ที่มีความ สลับซับซ้อนมาก มีข้อมูลที่ใช้ในโปรแกรมจานวน มาก จึงนิยมใช้ เทคนิคของการเขียนโปรแกรมแบบ OOP ในการพัฒนาโปรแกรมขนาด ใหญ่ในปัจจุบันนี้ 
ชนิดของข้อมูล ประกอบไปด้วย 
1. character (char) ใช้ 1 byte บน Dos มีค่า -128 ถึง127 นิยมใช้เก็บตัวอักษร 1 ตัวอักษร 
2. integer (int) ใช้ 2 byte มีค่า -32768 ถึง 32767 และยังมี long ซึ่งคล้าย integer แต่เก็บด้วย ช่วงตัวเลขที่ยาวกว่าจึงกินเนื้อที่ ถึง 4 byte 
3. float ใช้ 2 byte ใช้เก็บตัวเลขทศนิยม และยังมี double ซึ่งคล้าย float แต่เก็บด้วยช่วงตัวเลขที่ยาวกว่าจึงกินเนื้อที่ถึง 4 byte 
4. ในภาษา C จะไม่มีชนิดข้อมูลเป็น string แต่จะใช้สาย ของอักษร หรือ Array ของ Char แทนความจริงแล้ว ชนิดของข้อมูลยัง สามารถจาแนกไปได้อีกมาก แต่ในที่นี้ขอแนะนาเพียงเท่านี้ก่อน ก็ เพียงพอ 
ภาษาซี มี ข้อดี ดังนี้ 
- เป็นภาษาคอมพิวเตอร์ที่มีการพัฒนาขึ้นใช้งานเพื่อเป็น ภาษามาตรฐานที่ไม่ขึ้นกับโปรแกรมจัดระบบงานและไม่ขึ้นกับ ฮาร์ดแวร์ 
- เป็นภาษาคอมพิวเตอร์ที่อาศัยหลักการที่เรียกว่า "โปรแกรมโครงสร้าง" จึงเป็นภาษาที่เหมาะกับการพัฒนาโปรแกรม ระบบ 
- เป็นคอมไพเลอร์ที่มีประสิทธิภาพสูง ให้รหัสออบเจ็กต์สั้น ทางานได้รวดเร็ว เหมาะกับงานที่ต้องการ ความรวดเร็วเป็นสาคัญ 
- มีความคล่องตัวคล้ายภาษาแอสแซมบลี ภาษาซีสามารถ เขียนแทนภาษาแอสแซมบลีได้ดี ค้นหาที่ผิดหรือ แก้โปรแกรมได้ง่าย ภาษาซีจึงเป็นภาษาระดับสูงที่ทางานเหมือนภาษาระดับต่า 
- มีความคล่องตัวที่จะประยุกต์เข้ากับงานต่างๆ ได้เป็นอย่าง ดี การพัฒนาโปรแกรม เช่น เวิร์ดโพรเซสซิ่ง สเปรดชีต ดาตาเบส ฯลฯ มักใช้ภาษาซีเป็นภาษาสาหรับการพัฒนา 
- เป็นภาษาที่มีอยู่บนเกือบทุกโปรแกรมจัดระบบงาน มีใน เครื่องไมโครคอมพิวเตอร์ตั้งแต่ 8 บิต ไปจนถึง 32 บิต เครื่อง มินิคอมพิวเตอร์ และเมนเฟรม 
- เป็นภาษาที่รวมข้อดีเด่นในเรื่องการพัฒนา จนทาให้ป็ นภาษาที่มีผู้สนใจมากมายที่จะเรียนรู้หลักการของภาษา และวิธีการ เขียนโปรแกรม ตลอดจนการพัฒนางานบนภาษานี้ 
ภาษาซี มี ข้อเสีย ดังนี้ 
- เป็นภาษาที่เรียนรู้ยาก 
- การตรวจสอบโปรแกรมทาได้ยาก 
- ไม่เหมาะกับการเขียนโปรแกรมที่เกี่ยวข้องกับการออก รายงานที่มีรูปแบบซับซ้อนมากๆ
ตัวอย่างการเขียนโฟชาร์ทของภาษซี 
โจทย์ : C จงเขียนโปรแกรมรับ เลขจานวนเต็ม 1 ตัวแล้ว ตรวจสอบว่าเป็นเลขคู่ (Even) หรือ เลขคี่ (Odd) 
วิเคราะห์โจทย์ จากโจทย์แบ่งออกเป็นส่วน การรับค่า จานวนเต็ม และการตรวจสอบเลขคู่ เลขคี่ ซึ่งวิธีการตรวจสอบจะ ใช้เงื่อนไขคือ ตัวแปรที่เก็บตัวเลข mod (หารเอาเศษ) ด้วย 2 ผลจาก การคานวณ ถ้าได้ 0 คือเลขคู่ นอกนั้นคือเลขคี่ 
ผังโฟชาร์ท มีดังนี้... 
จัดทำโดย 
นำงสำวศศิธร ช่วยบำรุง เลขที่ 23 
นำงสำวอทิตยำ อ่อนจง เลขที่ 24 
ภาษา 
..ซี..

More Related Content

Featured

How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthThinkNow
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfmarketingartwork
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024Neil Kimberley
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)contently
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024Albert Qian
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsKurio // The Social Media Age(ncy)
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Search Engine Journal
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summarySpeakerHub
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next Tessa Mero
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentLily Ray
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best PracticesVit Horky
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project managementMindGenius
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...RachelPearson36
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Applitools
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at WorkGetSmarter
 

Featured (20)

How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work
 
ChatGPT webinar slides
ChatGPT webinar slidesChatGPT webinar slides
ChatGPT webinar slides
 

กวาว(1)

  • 1. ประวัติภาษาซี การเริ่มต้นพัฒนาภาษาซีเกิดขึ้นที่เบลล์แล็บส์ของเอทีแอนด์ ทีระหว่าง พ.ศ. 2512–2516 แต่ตามข้อมูลของริตชี ช่วงเวลาที่เกิดความ สร้างสรรค์มากที่สุดคือ พ.ศ. 2515 ภาษานี้ถูกตั้งชื่อว่า "ซี" เพราะ คุณลักษณะต่าง ๆ ต่อยอดมาจากภาษาก่อนหน้าคือ "บี" ซึ่งจากข้อมูล ของเคน ทอมป์สัน (Ken Thompson) กล่าวว่าภาษาบีเป็นรุ่นที่แยกตัว ออกจากภาษาบีซีพีแอลอีกทอดหนึ่ง จนมาถึง พ.ศ.2526 Bjarne Stroustrup แห่งห้องปฏิบัติการ เบล (Bell Laboratories) ได้พัฒนาภาษา C++ ขึ้นรายละเอียดและ ความสามารถของ C++ มีส่วนขยายเพิ่มจาก C ที่สาคัญ ๆ ได้แก่ แนวความคิดของการเขียนโปรแกรมแบบกาหนดวัตถุเป้าหมายหรื อแบบ OOP (Object Oriented Programming) ซึ่งเป็นแนวการเขียน โปรแกรมที่เหมาะกับการพัฒนาโปรแกรมขนาดใหญ่ที่มีความ สลับซับซ้อนมาก มีข้อมูลที่ใช้ในโปรแกรมจานวน มาก จึงนิยมใช้ เทคนิคของการเขียนโปรแกรมแบบ OOP ในการพัฒนาโปรแกรมขนาด ใหญ่ในปัจจุบันนี้ ชนิดของข้อมูล ประกอบไปด้วย 1. character (char) ใช้ 1 byte บน Dos มีค่า -128 ถึง127 นิยมใช้เก็บตัวอักษร 1 ตัวอักษร 2. integer (int) ใช้ 2 byte มีค่า -32768 ถึง 32767 และยังมี long ซึ่งคล้าย integer แต่เก็บด้วย ช่วงตัวเลขที่ยาวกว่าจึงกินเนื้อที่ ถึง 4 byte 3. float ใช้ 2 byte ใช้เก็บตัวเลขทศนิยม และยังมี double ซึ่งคล้าย float แต่เก็บด้วยช่วงตัวเลขที่ยาวกว่าจึงกินเนื้อที่ถึง 4 byte 4. ในภาษา C จะไม่มีชนิดข้อมูลเป็น string แต่จะใช้สาย ของอักษร หรือ Array ของ Char แทนความจริงแล้ว ชนิดของข้อมูลยัง สามารถจาแนกไปได้อีกมาก แต่ในที่นี้ขอแนะนาเพียงเท่านี้ก่อน ก็ เพียงพอ ภาษาซี มี ข้อดี ดังนี้ - เป็นภาษาคอมพิวเตอร์ที่มีการพัฒนาขึ้นใช้งานเพื่อเป็น ภาษามาตรฐานที่ไม่ขึ้นกับโปรแกรมจัดระบบงานและไม่ขึ้นกับ ฮาร์ดแวร์ - เป็นภาษาคอมพิวเตอร์ที่อาศัยหลักการที่เรียกว่า "โปรแกรมโครงสร้าง" จึงเป็นภาษาที่เหมาะกับการพัฒนาโปรแกรม ระบบ - เป็นคอมไพเลอร์ที่มีประสิทธิภาพสูง ให้รหัสออบเจ็กต์สั้น ทางานได้รวดเร็ว เหมาะกับงานที่ต้องการ ความรวดเร็วเป็นสาคัญ - มีความคล่องตัวคล้ายภาษาแอสแซมบลี ภาษาซีสามารถ เขียนแทนภาษาแอสแซมบลีได้ดี ค้นหาที่ผิดหรือ แก้โปรแกรมได้ง่าย ภาษาซีจึงเป็นภาษาระดับสูงที่ทางานเหมือนภาษาระดับต่า - มีความคล่องตัวที่จะประยุกต์เข้ากับงานต่างๆ ได้เป็นอย่าง ดี การพัฒนาโปรแกรม เช่น เวิร์ดโพรเซสซิ่ง สเปรดชีต ดาตาเบส ฯลฯ มักใช้ภาษาซีเป็นภาษาสาหรับการพัฒนา - เป็นภาษาที่มีอยู่บนเกือบทุกโปรแกรมจัดระบบงาน มีใน เครื่องไมโครคอมพิวเตอร์ตั้งแต่ 8 บิต ไปจนถึง 32 บิต เครื่อง มินิคอมพิวเตอร์ และเมนเฟรม - เป็นภาษาที่รวมข้อดีเด่นในเรื่องการพัฒนา จนทาให้ป็ นภาษาที่มีผู้สนใจมากมายที่จะเรียนรู้หลักการของภาษา และวิธีการ เขียนโปรแกรม ตลอดจนการพัฒนางานบนภาษานี้ ภาษาซี มี ข้อเสีย ดังนี้ - เป็นภาษาที่เรียนรู้ยาก - การตรวจสอบโปรแกรมทาได้ยาก - ไม่เหมาะกับการเขียนโปรแกรมที่เกี่ยวข้องกับการออก รายงานที่มีรูปแบบซับซ้อนมากๆ
  • 2. ตัวอย่างการเขียนโฟชาร์ทของภาษซี โจทย์ : C จงเขียนโปรแกรมรับ เลขจานวนเต็ม 1 ตัวแล้ว ตรวจสอบว่าเป็นเลขคู่ (Even) หรือ เลขคี่ (Odd) วิเคราะห์โจทย์ จากโจทย์แบ่งออกเป็นส่วน การรับค่า จานวนเต็ม และการตรวจสอบเลขคู่ เลขคี่ ซึ่งวิธีการตรวจสอบจะ ใช้เงื่อนไขคือ ตัวแปรที่เก็บตัวเลข mod (หารเอาเศษ) ด้วย 2 ผลจาก การคานวณ ถ้าได้ 0 คือเลขคู่ นอกนั้นคือเลขคี่ ผังโฟชาร์ท มีดังนี้... จัดทำโดย นำงสำวศศิธร ช่วยบำรุง เลขที่ 23 นำงสำวอทิตยำ อ่อนจง เลขที่ 24 ภาษา ..ซี..