Lệnh switch case là một cấu trúc điều khiển & rẽ nhánh hoàn toàn có thể được thay thế bằng cấu trúc if else. Tuy nhiên, việc sử dụng switch case sẽ giúp code của chúng ta dễ viết và dễ đọc hơn; Một điều nữa là sử dụng switch case có vẻ như cho […]
Chia sẻ
Bài 11. In mã ASCII của ký tự nhập từ bàn phím
Trong bài học số 11 này, chúng ta sẽ cùng nhau ôn lại các kiến thức cơ bản của ngôn ngữ lập trình C bằng cách làm 1 bài tập thực hành đầu tiên. Đề bài của chúng ta như sau: Bài tập:In mã ASCII của ký tự nhập từ bàn phím sử dụng ngôn […]
Bài 7. Nhập xuất trong C
Nhập xuất trong C – Cách sử dụng hàm scanf() và hàm printf() trong C để nhập và xuất như thế nào? Bài học số 7 trong khóa học lập trình C mang tên “học c bá đạo” sẽ cùng bạn tìm hiểu về việc nhập và xuất ở ngôn ngữ lập trình C nhé. […]
Bài 6. Tràn số trong lập trình C
Hiện tượng tràn số trong lập trìnhC là nội dung mà chúng ta sẽ học trong bài học thứ 6 về lập trình C cơ bản. Đây là một lỗi nên tránh và hoàn toàn có thể tránh được trong quá trình chúng ta viết code. Hãy đảm bảo bạn sử dụng kiểu dữ liệu […]
Bài 3. Biên dịch code C sử dụng g++
Trong bài học số 3 này, Lập trình không khó sẽ hướng dẫn các bạn cách biên dịch code C sử dụng g++. Mình sẽ trình bày cho các bạn cách để biên dịch một chương trình C thông qua giao diện dòng lệnh (command line interface) thay vì dùng IDE có giao diện. Khá […]