NgôN Ngữ LậP TrìNh C 01
-
Upload
le-van-huynh -
Category
Education
-
view
489 -
download
0
Transcript of NgôN Ngữ LậP TrìNh C 01
![Page 1: NgôN Ngữ LậP TrìNh C 01](https://reader034.fdocument.pub/reader034/viewer/2022050805/5587b8c8d8b42a7c398b4572/html5/thumbnails/1.jpg)
Lê Văn Huỳnh
![Page 2: NgôN Ngữ LậP TrìNh C 01](https://reader034.fdocument.pub/reader034/viewer/2022050805/5587b8c8d8b42a7c398b4572/html5/thumbnails/2.jpg)
Lịch sử ngôn ngữ C BCPL: Martin Richards. Unix, PDP-7, ngôn ngữ B: Ken Thomson, 1970. C, Dennis Ritchie, Brian Kernighan, Bell
Laboratory Dữ liệu trong BCPL và B: Chỉ có các từ máy
(Word) C có thêm: các kiểu số nguyên, số thực, ký tự,
con trỏ. Đặc điểm: Lỏng lẻo, Hiêu quả, mềm dẻo.
![Page 3: NgôN Ngữ LậP TrìNh C 01](https://reader034.fdocument.pub/reader034/viewer/2022050805/5587b8c8d8b42a7c398b4572/html5/thumbnails/3.jpg)
![Page 4: NgôN Ngữ LậP TrìNh C 01](https://reader034.fdocument.pub/reader034/viewer/2022050805/5587b8c8d8b42a7c398b4572/html5/thumbnails/4.jpg)
Lập chương trình có chức năng viết lên màn hình câu chào “Hello, world!”
#include <stdio.h>void main(){
printf(“\nHello, world!”);}
![Page 5: NgôN Ngữ LậP TrìNh C 01](https://reader034.fdocument.pub/reader034/viewer/2022050805/5587b8c8d8b42a7c398b4572/html5/thumbnails/5.jpg)
![Page 6: NgôN Ngữ LậP TrìNh C 01](https://reader034.fdocument.pub/reader034/viewer/2022050805/5587b8c8d8b42a7c398b4572/html5/thumbnails/6.jpg)
1. Mở tệp mới (File\New)2. Viết chương trình 3. Lưu tệp và dịch4. Nếu có lỗi thì
Sửa lỗi chính tả, cú pháp Quay lại bước 3
5. Chạy thử6. Nếu có lỗi thì
Dò và sửa lỗi Quay lại bước 3
7. Kết thúc
Mở tệp mới
Viết chương trình
Lưu tệp và dịch
Lỗi biên dịch ?
Sửa lỗi
Chạy thử
Lỗi runtime?Sửa lỗi
Kết thúc
![Page 7: NgôN Ngữ LậP TrìNh C 01](https://reader034.fdocument.pub/reader034/viewer/2022050805/5587b8c8d8b42a7c398b4572/html5/thumbnails/7.jpg)