实例介绍
C语言大学教程(第7版)英文版,讲得很不错,台湾老师叫“虫书”。
Deitel@ Series Page How To Program series (continued from previous column, Android How to Program Visual basic 2010 How to Program C++ How to program, 8/E Visual Basic 2008 How to Program C How to Program, 7/E Visual C# 2010 How to Program, 4/E JavaTM How to Program, 9/E Ⅴ isual c#∞2008 How to Program,3/E Java M How to Program, Late Objects Version, 8/E Deitel Developer Series Visual C++ 2008 How to Program, 2e am, 5/E AJAX, Rich Internet Applications and Web Visual Basic@ 2010 How to Program Development for Programmers Visual C# 2010 How to Program, 3/E Android for Programmers: An App-Driven A pp Simply Series C ++for programmers C# 2010 for Programmers Simply c++: An app-Driven Tutorial A pproach iPhone@ for Programmers: An App-Driven Approach Simply Java Programming: An App-Driven JavaTm for programmers, 2/e utorial Approach Java Script for Programmers Simply C#: An App-Driven Tutorial Approach Simply Visual Basic 2010: An App-Driven LiveLessons Video Learning products Approach, 4/E Www.Deitel.com/books/livelessons Coursesmart Web books Android app development Fundamentals C++ Fundamentals Www.dEiteL.com/books/coursesmart/ Java TM fundamentals C++ How to Program, 5/E, 6/E,7/E &8/E C# 2010 Fundamentals Simply C++: An App-Driven Tutorial Approach hone App Development Fundamentals Java M How to Program, 6/E, 7/E,8/E&9/E JavaScript fundamentals Simply Visual Basic 2010: An App-Driven Visual basic fundamentals pproach, 4/E To receive updates on Deitel publications, Resource Centers, training courses, partner offers and more, lease register for the free deitel Buzz online e-mail newsletter at Www.DeitEl.com/newsletter/subscribe.htm1 and join the communities on l witter adeste facebook. com/Deite l Fan d google+ gplus to/deitel To communicate with the authors, send e-mail to deiteladeitel. com For information on government and corporate Dive-Into Series on-site ffered by deitel Associates, Inc. worldwide, visit Www.Deitel.com/training/ or write to deiteladeitel For continuing updates on Prentice Hall/Deitel publications visit www.Pearsonhighered.com/deitel/ Visit the Deitel resource Centers that will help you master programming languages, software develop ment, Android and iPhone/iPad app development, and Internet-and web-related topics Www.DeitEl.com/resourcecenTers.htm1 HOWT○ PR○GRAM SEVENTH EDITION Paul deitel Deitel e associates, Inc Harvey deitel Deitel d associates, Inc DEITE PEARSON Boston Columbus Indianapolis New York San Francisco Upper Saddle River Amsterdam Cape Town Dubai London Madrid Milan Munich Paris Montreal toronto Delhi Mexico City Sao Paulo Sydney Hong Kong Seoul Singapore Taipei Tokyo Editorial Director: Marcia horton Editor-in-Chief: Michael Hirsch Associate Editor: Carole Snyder Vice President, Marketing: Patrice Jones Marketing Manager: Yezan alayan Marketing Coordinator: Kathryn Ferranti Vice President. Production: Vince O'Brien Managing Editor: Jeff Holcomb Associate Managing Editor: Robert Engelhardt Operations Specialist: Lisa Mcdowell Art Director: Anthony gemmellaro Cover Design: Paul Deitel Harvey Deitel, Abbey Deitel Anthony Ggemmellaro CoverPhotoCreditExcellentbackgrounds/shutterstock.com Media editor daniel sandin Credits and acknowledgments borrowed from other sources and reproduced, with permission, in this textbook appear on page vi The authors and publisher of this book have used their best efforts in preparing this book. These efforts include the development, research, and testing of the theories and programs to determine their effectiveness. The authors and pub lisher make no warranty of any kind, expressed or implied, with regard to these programs or to the documentation contained in this book. The authors and publisher shall not be liable in any event for incidental or consequential dam- ages in connection with, or arising out of, the furnishing, performance, or use of these programs Copyright O 2013, 2010, 2007, 2004, 2001 Pearson Education, Inc, publishing as Prentice Hall. All rights reserved Manufactured in the United States of America. This publication is protected by Copyright, and permission should be obtained from the publisher prior to any prohibited reproduction, storage in a retrieval system, or transmission in any form or by any means, electronic, mechanical, photocopying, recording, or likewise. To obtain permission(s )to use material from this work, please submit a written request to Pearson Education, Inc, Permissions Department, One Lake Street, Upper Saddle River, New Jersey 07458, or you may fax your request to 201-236-3290 Many of the designations by manufacturers and sellers to distinguish their products are claimed as trademarks. Where those designations appear in this book, and the publisher was aware of a trademark claim, the designations have been printed in init ial caps or all caps Library of Congress Cataloging-in-Publication Data Deitel, Paul J C: how to program/ Paul Deitel, Deitel Associates, Inc, harvey Deitel, Deitel associates Inc, Abbey Deitel, Deitel Associates, Inc.-- Seventh edition pages cm (How to program series) ISBN978-0-13-299044 1. C (Computer program language)2. C++(Computer program language)3. Java (computer program language) I. Deitel, harvey m., II. Deitel, Abbey III. Title. QA76.73.C15D442012 005.133-dc23 10987654321 SBN-10:0-13-299044-X 工SBN-13:978-0-13-299044-8 PEARSON In Memory of Dennis Ritchie, creator of the c programming language and co-creator of the UNIr operating system Paul and Harvey deitel Trademarks DEITEL, the double-thumbs-up bug and DIVE INTO are registered trademarks of Deitel and Associates MICROSOFT AND/OR ITS RESPECTIVE SUPPLIERS MAKE NO REPRESENTATIONS ABOUT THE SUITABILITY OF THE INFORMATION CONTAINED IN THE DOCUMENTS AND RELATED GRAPHICS PUBLISHED AS PART OF THE SERVICES FOR ANY PURPOSE ALL SUCH DOCUMENTS AND RELATED GRAPHICS ARE PROVIDED AS IS WITHOUT WARRANTY OF ANY KIND. MICROSOFT AND/OR ITS RESPECTIVE SUPPLIERS HEREBY DISCLAIM ALL WARRANTIES AND CONDITIONS WITH REGARD TO THIS INFORMA TION, INCLUDING ALL WARRANTIES AND CONDITIONS OF MERCHANTABILITY WHETHER EXPRESS, IMPLIED OR STATUTORY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT SHALL MICROSOFT AND/OR ITS RESPECTIVE SUPPLIERS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION ARISING OUT OF OR IN CONNECTION WITH THE USE OR PER- FORMANCE OF INFORMATION AVAILABLE FROM THE SERVICES THE DOCUMENTS AND RELATED GRAPHICS CONTAINED HEREIN COULD INCLUDE TECHNICAL INACCURACIES OR TYPOGRAPHICAL ERRORS. CHANGES ARE PERIODI CALLY ADDED TO THE INFORMATION HEREIN. MICROSOFT AND/ORITS RESPECTIVE SUPPLIERS MAY MAKE IMPROVEMENTS AND/OR CHANGES IN THE PRODUCT(S) AND/ OR THE PROGRAM(S) DESCRIBED HEREIN AT ANY TIME. PARTIAL SCREEN SHOTS MAY BE VIEWED IN FULL WITHIN THE SOFTWARE VERSION SPECIFIED Contents Appendices e through H are PdF documents posted online at the books Companion Websitelocatedatwww.pearsonhighered.com/deited) Preface XIX I Introduction to Computers, the Internet and the web 1.1 Introduction 1.2 Computers and the Internet in Industry and research 1.3 Hardware and Software 1.3.1 MooreS L 1.3.2 Computer Organization 1.4 Data hierarchy 2256679 1.5 Programming Languages 1.6 The C Programming Language 10 1.7 C Standare d library 12 1. 8 C++ and Other C-Based languages 13 1.9 Object Technolog. 14 1.10 T ypical C Program Development Environment 16 1.10.1 Phase 1: Creating a program 16 1.10.2 Phases 2 and 3: Preprocessing and Compiling a C Program 16 1.10. 3 Phase 4: Linking 1.10.4 Phase 5: Loading 18 1. 10.5 Phase 6: Execution 18 1. 10.6 Problems That May Occur at Execution Time 18 1. 10.7 Standard Input, Standard Output and Standard Error Streams 18 1. 11 Test-Driving a C Application in Windows, Linux and Mac Os X 19 1.11.1 Running a C application from the Windows Command Prompt 1.11.2 Running a c application Using gnu c with linux 22 1. 11.3 Running a C Application Using GNU C with Mac OsX 25 1.12 Operating systems 27 1.12.1 Windows--A Proprietary Operating System 28 1. 12.2 Linux-An Open-Source Operating System 28 1. 12.3 Apples Mac OS X; Ap pple s ioS for iPhone, ipad and iPod Touch Devices 29 1. 12.4 Google's android 29 lll Contents 1.13 The Internet and World Wide Web 30 1.14 Some Key software Development Terminology 31 1. 15 Keeping Up-to-Date with Information Technologies 33 1.16 Web resources 34 2 Introduction to C Programming 40 2.1 Introduction 2.2 A Simple C Program: Printing a Line of Text 2.3 Another Simple C Program: Adding Two Integers 4444 2.4 Memory Concepts 2.5 Arithmetic in C 50 2.6 Decision Making: Equality and Relational Operators 54 2.7 Secure C Programming 58 3 Structured Program Development in C 70 3.1 Introduction 71 3.2 Algorithms 71 3.3 Pseudocode 71 3.4 Control Structures 3.5 The if Selection Statement 74 3.6 The if.else Selection Statement 75 3.7 The while Repetition Statement 79 8 Formulating Algorithms Case Study 1 Counter-Controlled Repetition 80 3.9 Formulating Algorithms with Top-Down, Stepwise Refinement Case Study 2 Sentinel-Controlled Repetition 82 3.10 Formulating Algorithms with Top-Down, Stepwise Refinement Case study 3 Nested Control Statements 89 3.11 Assignment Operators 93 3. 12 Increment and Decrement Operators 3.13 Secure C Programming 96 4 C Program Control 14 4.1 Introduction 115 4.2 Repetition essentials 115 4.3 Counter-Controlled Repetition 116 4.4 for Repetition Statement 117 4.5 for Statement: Notes and Observations 120 4.6 Examples Using the for Statement 121 4.7 switch Multiple-Selection Statement 124 4.8 do. while Repetition Statement 130 4.9 break and continue Statements 132 4.10 Logical Operators 134 4.11 Confusing Equality(=)and Assignment(=)Operators 137 Contents 4.12 Structured Programming Summary 138 4.13 Secure C Programming 143 5 CFunctions 158 5.1 Introduction 159 2 Program Mod 159 5.3 Math Library functions 160 5.4 Functions 162 5.5 Function Definitions 62 5.6 Function Prototypes: A Deeper look 166 5.7 Function Call Stack and Stack frames 5.8 Headers 172 5.9 Passing arguments by value and by reference 173 5.10 Random Number Generation 174 5.11 Example: A Game of Chance 179 5.12 Storage Classes 182 5.13 Scope rules 84 5. 14 Recursion 187 5.15 Example Using Recursion: Fibonacci Series 191 5.16 Recursion vs Iteration 194 5.17 Secure C programming 197 6 C Arrays 216 6.1 Introduction 217 6.2 Arrays 217 6.3 Defining Arrays 218 6.4 Array examples 219 6.5 Passing arrays to functions 232 6.6 Sorting arrays 236 6.7 Case Study: Computing Mean, Median and Mode Using arrays 239 6. 8 Searchin g arrays 244 6.9 Multidimensional arrays 249 6. 10 Variable-Length Arrays 256 6.11 Secure C Programming 259 7 C Pointers 277 7. 1 Introduction 278 7.2 Pointer Variable Definitions and initialization 278 7.3 Pointer operators 279 7.4 Passing arguments to Functions by Reference 282 7.5 USing the const Qualifier with Pointers 284 7.5.1 Converting a String to Uppercase Using a Non-Constant Pointer to Non-Constant Data 287 【实例截图】
【核心代码】
标签:
小贴士
感谢您为本站写下的评论,您的评论对其它用户来说具有重要的参考价值,所以请认真填写。
- 类似“顶”、“沙发”之类没有营养的文字,对勤劳贡献的楼主来说是令人沮丧的反馈信息。
- 相信您也不想看到一排文字/表情墙,所以请不要反馈意义不大的重复字符,也请尽量不要纯表情的回复。
- 提问之前请再仔细看一遍楼主的说明,或许是您遗漏了。
- 请勿到处挖坑绊人、招贴广告。既占空间让人厌烦,又没人会搭理,于人于己都无利。
关于好例子网
本站旨在为广大IT学习爱好者提供一个非营利性互相学习交流分享平台。本站所有资源都可以被免费获取学习研究。本站资源来自网友分享,对搜索内容的合法性不具有预见性、识别性、控制性,仅供学习研究,请务必在下载后24小时内给予删除,不得用于其他任何用途,否则后果自负。基于互联网的特殊性,平台无法对用户传输的作品、信息、内容的权属或合法性、安全性、合规性、真实性、科学性、完整权、有效性等进行实质审查;无论平台是否已进行审查,用户均应自行承担因其传输的作品、信息、内容而可能或已经产生的侵权或权属纠纷等法律责任。本站所有资源不代表本站的观点或立场,基于网友分享,根据中国法律《信息网络传播权保护条例》第二十二与二十三条之规定,若资源存在侵权或相关问题请联系本站客服人员,点此联系我们。关于更多版权及免责申明参见 版权及免责申明
网友评论
我要评论