C - Programming - C - Program - C - Program.pdf

(11749 KB) Pobierz
C++ P ROGRAMMING :
F ROM P ROBLEM A NALYSIS TO P ROGRAM D ESIGN
F OURTH E DITION
D.S. M ALIK
Australia Brazil Japan Korea Mexico Singapore Spain United Kingdom United States
1247352551.018.png 1247352551.019.png 1247352551.020.png 1247352551.021.png 1247352551.001.png 1247352551.002.png 1247352551.003.png
 
C++ Programming: From Problem Analysis
to Program Design, Fourth Edition
by D.S. Malik
ª 2009 Course Technology, Cengage Learning
ALL RIGHTS RESERVED. No part of this work covered by the
copyright herein may be reproduced, transmitted, stored or used
in any form or by any means graphic, electronic, or mechanical,
including but not limited to photocopying, recording, scanning,
digitizing, taping, Web distribution, information networks, or
information storage and retrieval systems, except as permitted
under Section 107 or 108 of the 1976 United States Copyright Act,
without the prior written permission of the publisher.
Senior Product Manager: Alyssa Pratt
Acquisitions Editor: Amy Jollymore
Content Product Manager: Jill Braiewa
Marketing Manager: Bryant Chrzan
Editorial Assistant: Patrick Frank
Print Buyer: Julio Esperas
Cover Designer: Lisa Kuhn, Curio Press, LLC
Compositor: Integra
Art Director: Marissa Falco
Validation: Green Pen Quality Assurance
Proofreader: Green Pen Quality Assurance
Indexer: Liz Cunningham
For product information and technology assistance, contact us at
Cengage Learning Customer & Sales Support, 1-800-354-9706
For permission to use material from this text or product, submit
all requests online at cengage.com/permissions
Further permissions questions can be emailed to
permissionrequest@cengage.com
ISBN-13: 978-1-4239-0209-6
ISBN-10: 1-4239-0209-2
Course Technology
25 Thomson Place
Boston, MA 02210
USA
Visual C++ .NET and PowerPoint are registered trademarks
of the Microsoft Corporation; Pentium is a registered
trademark of Intel Corporation; IBM is a registered trademark
of Industrial Business Machines.
Disclaimer
Course Technology reserves the right to revise this publication
and make changes from time to time in its content without
notice.
The programs in this book are for instructional purposes only.
They have been tested with care, but are not guaranteed for any
particular intent beyond educational purposes. The authors and
the publisher do not offer any warranties or representations, nor
do they accept any liabilities with respect to the programs.
Cengage Learning is a leading provider of customized
learning solutions with office locations around the globe,
including Singapore, the United Kingdom, Australia, Mexico,
Brazil, and Japan. Locate your local office at:
international.cengage.com/region
Cengage Learning products are represented in Canada
by Nelson Education, Ltd.
For your lifelong learning solutions, visit
course.cengage.com
Visit our corporate website at cengage.com
Printed in Canada
123456714131211100908
1247352551.004.png 1247352551.005.png 1247352551.006.png 1247352551.007.png 1247352551.008.png 1247352551.009.png 1247352551.010.png 1247352551.011.png 1247352551.012.png 1247352551.013.png 1247352551.014.png
 
TO
My Daughter
Shelly Malik
B RIEF C ONTENTS
PREFACE
xxvii
1.
An Overview of Computers and Programming Languages
1
2.
Basic Elements of C++
29
3.
Input/Output
115
4.
Control Structures I (Selection)
167
5.
Control Structures II (Repetition)
231
6.
User-Defined Functions I
307
7.
User-Defined Functions II
345
8.
User-Defined Simple Data Types, Namespaces,
and the string Type
415
9.
Arrays and Strings
469
10. Applications of Arrays (Searching and Sorting)
and the vector Type
545
11. Records ( struct s)
603
12. Classes and Data Abstraction
641
13. Inheritance and Composition
717
14. Pointers, Classes, Virtual Functions, and Abstract Classes
785
15. Overloading and Templates
853
16. Exception Handling
943
17. Recursion
981
18. Linked Lists
1017
19. Stacks and Queues
1111
1247352551.015.png 1247352551.016.png 1247352551.017.png
Zgłoś jeśli naruszono regulamin