In the first edition of this book, I decided to assume that someone else had taught you C and that you have at least a reading level of comfort with it. My primary focus was on simplifying what I found difficult – the C++ language. In this edition I have added a chapter that is a very rapid introduction to C, assuming that you have some kind of programming experience already. In addition, just as you learn many new words intuitively by seeing them in context in a novel, it’s possible to learn a great deal about C from the context in which it is. | Thinking In C Bruce Eckel President MindView Inc. B Prentice Hall PTR Upper Saddle River New Jersey 07458 http Publisher Alan Apt Production Editor Mona Pompilli Development Editor Sondra Chavez Book Design Cover Design and Cover Photo Daniel Will-Harris daniel@ Copy Editor Shirley Michaels Production Coordinator Lori Bulwin Editorial Assistant Shirley McGuire B 1999 by Bruce Eckel MindView Inc. Published by Prentice Hall Inc. A Paramount Communications Company Englewood Cliffs New Jersey 07632 The information in this book is distributed on an as is basis without warranty. While every precaution has been taken in the preparation of this book neither the author nor the publisher shall have any liability to any person or entitle with respect to any liability loss or damage caused or alleged to be caused directly or indirectly by instructions contained in this book or by the computer software or hardware products described herein. All rights reserved. No part of this book may be reproduced in any form or by any electronic or mechanical means including information storage and retrieval systems without permission in writing from the publisher or author except by a reviewer who may quote brief passages in a review. Any of the names used in the examples and text of this book are fictional any relationship to persons living or dead or to fictional characters in other works is purely coincidental. Printed in the United States of America 10 9 8 7 6 5 4 3 2 1 ISBN 0-13-917709-4 Prentice-Hall International UK Limited London Prentice-Hall of Australia Pty. Limited Sydney Prentice-Hall Canada Inc. Toronto Prentice-Hall Hisapnoamericana . Mexico Prentice-Hall of India Private Limited New Delhi Prentice-Hall of Japan Inc. Tokyo Simon Schuster Asia Pte. Ltd. Singapore Editora Prentice-Hall do Brasil Ltda. Rio de Janeiro dedication to the scholar the healer and the .