About This E-Book
EPUB is an open, industry-standard format for e-books. However, support for EPUB and its many features varies across reading devices and applications. Use your device or app settings to customize the presentation to your liking. Settings that you can customize often include font, font size, single or double column, landscape or portrait mode, and figures that you can click or tap to enlarge. For additional information about the settings and features on your reading device or app, visit the device manufacturers Web site.
Many titles include programming code or configuration examples. To optimize the presentation of these elements, view the e-book in single-column, landscape mode and adjust the font size to the smallest setting. In addition to presenting code and configurations in the reflowable text format, we have included images of the code that mimic the presentation found in the print book; therefore, where the reflowable format may compromise the presentation of the code listing, you will see a Click here to view code image link. Click the link to view the print-fidelity code image. To return to the previous page viewed, click the Back button on your device or app.
Sams Teach Yourself Beginning Programming in 24 Hours
Fourth Edition
Greg Perry
Dean Miller
Sams Teach Yourself Beginning Programming in 24 Hours, Fourth Edition
Copyright 2020 by Pearson Education, Inc.
All rights reserved. This publication is protected by copyright, and permission must 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. For information regarding permissions, request forms and the appropriate contacts within the Pearson Education Global Rights & Permissions Department, please visit www.pearson.com/permissions/.
Many of the designations used 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 with initial capital letters or in all capitals.
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 information, 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 performance of information available from the services. The documents and related graphics contained herein could include technical inaccuracies or typographical errors. Changes are periodically added to the information herein. Microsoft and/or its respective suppliers may make improvements and/or changes in the product(s) and/or the program(s) described herein at any time. Partial screenshots may be viewed in full within the software version specified.
Microsoft and Windows are registered trademarks of the Microsoft Corporation in the U.S.A. and other countries. Screenshots and icons reprinted with permission from the Microsoft Corporation. This book is not sponsored or endorsed by or affiliated with the Microsoft Corporation.
Cover credit: Ryan McVay/Photodisc/Getty Images
The author and publisher have taken care in the preparation of this book, but make no expressed or implied warranty of any kind and assume no responsibility for errors or omissions. No liability is assumed for incidental or consequential damages in connection with or arising out of the use of the information or programs contained herein.
For information about buying this title in bulk quantities, or for special sales opportunities (which may include electronic versions; custom cover designs; and content particular to your business, training goals, marketing focus, or branding interests), please contact our corporate sales department at or (800) 382-3419.
For government sales inquiries, please contact .
For questions about sales outside the U.S., please contact .
Library of Congress Catalog Card Number: 2019951973
ISBN-13: 978-0-13-583670-5
ISBN-10: 0-13-583670-0
ScoutAutomatedPrintCode
Editor-in-Chief
Mark L. Taub
Acquisitions Editor
Kim Spenceley
Managing Editor
Sandra Schroeder
Development Editor
Chris Zahn
Senior Project Editor
Lori Lyons
Technical Editors
John Fonte
Michael Garcia
Production Manager
Aswini Kumar/codeMantra
Indexer
Ken Johnson
Proofreader
Abigail Manheim
Cover Designer
Chuti Prasertsith
Compositor
codeMantra
Contents at a Glance
Appendixes
To access the online appendixes, go to informit.com/register to register your book. After your book is registered, enter the product ISBN 9780135836705 and go to the Downloads tab below the book description. Click the link to download the appendixes.
About the Author
Greg Perry is a speaker and writer in both the programming and applications sides of computing. He is known for bringing programming topics down to the beginners level. Perry has been a programmer and trainer for two decades. He received his first degree in computer science and then earned a Masters degree in corporate finance. Besides writing, he consults and lectures across the country, including at the acclaimed Software Development programming conferences. Perry is the author of more than 75 other computer books. In his spare time, he gives lectures on traveling in Italy, his second-favorite place to be.
Dean Miller is a writer and editor with more than 20 years of experience in both the publishing and licensed consumer products businesses. Over the years, he has created or helped shape a number of bestselling books and series, including Sams Teach Yourself in 21 Days, Sams Teach Yourself in 24 Hours, and the Unleashed series, all from Sams Publishing. He has written or cowritten 15 books on computer programming and professional wrestling and is still looking for a way to combine the two into one strange amalgam.
Dedication
Dean: To Fran, Margaret, John, and AliceThanks for being the absolute best family someone could ask for.
Acknowledgments
Greg: My thanks go to all my friends at Pearson. Most writers would refer to them as editors; to me, they are friends. I want all my readers to understand this: The people at Pearson care about you most of all. The things they do result from their concern for your knowledge and enjoyment. On a more personal note, my beautiful bride, Jayne; my mother Bettye Perry; and my friends, who wonder how I find the time to write, all deserve credit for supporting my need to write.