If one learns from others but does not think,one will be bewildered; If one thinks but does not learn from others,one will be in peril. —Confucius Welcome to the second edition of Teach Yourself C in 24 Hours! Based on the success of the first edition of the book and the feedback from the readers, we have re-written or modified every single chapter of the book to make the second edi- tion more suitable for beginners like you who want to get started with the C program- ming language as quickly as possible. Of course,it’s very normal to spend more than 24 hours to really understand the con- cepts and programming skills introduced in the book. However,the good news is that this book offers many sample programs and exercises with clear explanations and answers,which makes the concepts of the C language easier to understand. In fact,Teach Yourself C in 24 Hoursprovides a good starting point for you in C pro- gramming. It covers important topics in C programming,and lays a solid foundation for a serious beginner like you. After reading this book,you’ll be able to write basic C pro- grams on your own. You will profit from reading the book when you start to apply C programs to real prob- lems or move on to learn other programming languages,such as Perl,C++,and Java. Who Should Read This Book? If this is your first time learning C,this book is written for you. In fact,in writing this book I assume that the readers have no previous programming experience. Of course,it’s always a big plus if you have some knowledge of computers. Special Features of This Book This book contains the following special elements that make it simpler and clearer for you to digest the rudimentary features and concepts of C as they are introduced: •Syntax boxes •Notes •Cautions •Tips 01 067231861x intro 4.10.2000 10:58 AM Page 1 Syntax boxesexplain some of the more complicated features of C,such as control struc- tures. Each syntax box consists of a formal definition of the feature followed by an explanation. Here is an example of a syntax box: The syntax for the malloc()function is #include <stdlib.h> void *malloc(size_t size); Here,sizespecifies the number of bytes of storage to allocate. The header file, stdlib.h,has to be included before the malloc()function can be called. Because the malloc()function returns a voidpointer,its type is automatically converted to the type of pointer on the left side of an assignment operator. (You’ll learn more about the malloc()function later in the book.) Notesare explanations of interesting properties of a particular C program feature. Let’s have a look at the following example of a note: 2 Sams Teach Yourself C in 24 Hours ,SYNTAX , In left-justified output, the value being displayed appears at the left end of the value field. In right-justified output, the value being displayed appears at the right end of the value field. Warningswarn you of programming pitfalls you should avoid. Here is a typical warning: Never use the reserved keywords in C, nor names of the C library functions as variable names in your program. Tipsare hints on how to write your C programs better. The following is an example of a tip: If you have a complex programming project, break it into smaller pieces. And try to make one function do one thing and do it very well. Programming Examples
- 粉丝: 168
- 资源: 2144
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- 2023 年电子设计竞赛试题.zip
- springboot+activiti+angular 这是spring boot框架集成activiti工作流实现.zip
- 基于Python的PCA人脸识别算法的原理及实现代码+文档详解.zip
- 《人工智能AI生成图片》
- springboot 整合jpa框架和querydsl框架,实现多数据源数据增删改查.zip
- SpringBoot + LayUI 框架快速搭建WEB网站.zip
- 基于python开发的的验证码识别+源码(期末大作业&课程设计&项目开发)
- douban.ipynb
- 基于C#的游戏服务器后台.zip
- 基于neo4j制作的医药领域-疾病诊断知识图谱dump文件