全英文c语言讲解,C语言学习(英文版)优秀讲义.ppt

C语言学习(英文版)优秀讲义

Chapter 1 Getting Started of C School of Software, Nanchang HangKong University     * Chapter 1 Getting Started of C Outline 1.1 Programming, Compilation and Execution 1.2 The First C program 1.3 Another Simple C Program: Adding Two Integers 1.4 Basic Operations of TC The only way to learn a new programming language is by writing programming in it. Outline Key points The Basic Structure of C Program The Basic Operations of TC 1.1 Programming, Compilation and Execution The Editor can be used to type the C program. The complier convert the typed program to machine language. The principal text editor on the UNIX system is called vi. Some systems, such as Turbo C and Borland C++, integrate the text editor and the compiler. 1.2 The first C Program 1/*A first program in C */ 2 3#include 4 5int main() 6{ 7 printf( "Welcome to C!\n" ); 8 9 return 0; 10} Welcome to C! 1.2 The first C Program Comments Text enclosed within /* */, completely ignored by the compiler. Can be written at any place in the program Are essential when building big software Cannot be nested. /* /* */ */ is invalid. Can be split over more than one line. 1.2 The first C Program #include Preprocessor directive(\) Tells computer to load contents of a certain file allows standard input/output operations int main() C programs contain one or more functions, exactly one of which must be main Parenthesis used to indicate a function int means that main "returns" an integer value Braces ({ and }) indicate a block The bodies of all functions must be contained in braces 1.2 The first C Program A C program,whatever its size,consists of functions and variables. 1.2 The first C Program printf( "Welcome to C!\n" ); Instructs computer to perform an action Specifically, prints the string of characters within quotes (“ ”) Entire line called a statement All statements must end with

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值