Cprogramming 简明教程

C Tutorial

C Tutorial

C programming 是一种通用、过程化、命令式计算机编程语言,由丹尼斯·M·里奇于 1972 年在贝尔电话实验室开发,用于开发 UNIX 操作系统。C 是使用最广泛的计算机语言。它不断在普及性上名列第一,与 Java 编程语言齐名,后者在现代软件程序员中也同样流行且使用最广泛。

C programming is a general-purpose, procedural, imperative computer programming language developed in 1972 by Dennis M. Ritchie at the Bell Telephone Laboratories to develop the UNIX operating system. C is the most widely used computer language. It keeps fluctuating at number one scale of popularity along with Java programming language, which is also equally popular and most widely used among modern software programmers.

Why to Learn C Programming?

C programming 语言对于学生和职业人士来说是必须的,特别是当他们在软件开发领域工作时,成为一名优秀的软件工程师。以下是您应该学习 C 编程的一些重要原因:

C programming language is a MUST for students and working professionals to become a great Software Engineer specially when they are working in Software Development Domain. Here are some of the important reasons why you should learn C Programming −

  1. It is a structured programming language and you can use the skills learned in C to master other programming languages.

  2. You can use C program to write efficient codes and develop robust projects.

  3. C is a low-level language and you can use it to interact more directly with the computer’s hardware and memory.

Facts about C

C 是使用最广泛和最流行的系统编程语言。大多数最先进的软件都是使用 C 实现的。以下是关于 C 语言的一些事实:

C is the most widely used and popular System Programming Language. Most of the state-of-the-art software have been implemented using C. Here are some facts about the C language:

  1. C was invented to write an operating system called UNIX. The UNIX OS was totally written in C.

  2. C is a successor of B language which was introduced around the early 1970s.

  3. The language was formalized in 1988 by the American National Standard Institute (ANSI).

Hello World using C Programming

为了让您对 C programming 稍微兴奋一些,我将为您提供一个小型传统的 C Programming Hello World 程序。您可以在此处使用“编辑和运行”按钮运行它。

Just to give you a little excitement about C programming, I’m going to give you a small conventional C Programming Hello World program. You can run it here using the "Edit and Run" button.

#include <stdio.h>

int main() {

   /* my first program in C */
   printf("Hello, World! \n");

   return 0;
}

Applications of C Programming

C 最初用于系统开发工作,特别是构成操作系统的程序。C 被采纳为系统开发语言,因为它产生的代码运行速度几乎与汇编语言编写的代码一样快。以下是使用 C 的一些示例:

C was initially used for system development work, particularly the programs that make-up the operating system. C was adopted as a system development language because it produces code that runs nearly as fast as the code written in assembly language. Some examples of the use of C are -

  1. Operating Systems

  2. Language Compilers

  3. Assemblers

  4. Text Editors

  5. Print Spoolers

  6. Network Drivers

  7. Modern Programs

  8. Databases

  9. Language Interpreters

  10. Utilities

Audience

本教程专为需要从头开始了解 C programming 语言的软件程序员设计。此 C tutorial 将让您对 C 编程语言有足够的了解,您可以在此基础上提升到更高的专业知识水平。

This tutorial is designed for software programmers with a need to understand the C programming language starting from scratch. This C tutorial will give you enough understanding on C programming language from where you can take yourself to higher level of expertise.

Prerequisites

在继续本教程之前,您应该对计算机编程术语有基本了解。对任何编程语言的基本了解都将帮助您理解 C programming 概念并快速进入学习正轨。

Before proceeding with this tutorial, you should have a basic understanding of Computer Programming terminologies. A basic understanding of any of the programming languages will help you in understanding the C programming concepts and move fast on the learning track.

FAQs on C Programming

关于 C 有很多常见问题 (FAQ),本节会尝试简要回答它们。

There are some very Frequently Asked Questions(FAQ) about C, this section tries to answer them briefly.