C Programming_ Just the FAQs [Chisholm, Hanley, Jones, Lindner & Work 1995-05].pdf
(
2423 KB
)
Pobierz
Contents
i
C Programming:
Just the FAQs
C PROGRAMMING: JUST THE FAQS
Paul S. R. Chisholm
David Hanley
Michael Jones
Michael Lindner
Lloyd Work
201 West 103rd Street
Indianapolis, Indiana 46290
ii
C Programming: Just the FAQs
Copyright
©
1995 by Sams Publishing
FIRST EDITION
All rights reserved. No part of this book shall be reproduced, stored in a retrieval
system, or transmitted by any means, electronic, mechanical, photocopying,
recording, or otherwise, without written permission from the publisher. No patent
liability is assumed with respect to the use of the information contained herein.
Although every precaution has been taken in the preparation of this book, the
publisher and author assume no responsibility for errors or omissions. Neither is
any liability assumed for damages resulting from the use of the information
contained herein. For information, address Sams Publishing, 201 W. 103rd St.,
Indianapolis, IN 46290.
International Standard Book Number: 0-672-30561-5
Library of Congress Catalog Card Number: 94-66635
98 97
96
95
4 3
2
1
Interpretation of the printing code: the rightmost double-digit number is the year
of the book’s printing; the rightmost single-digit, the number of the book’s
printing. For example, a printing code of 95-1 shows that the first printing of the
book occurred in 1995.
Composed in AGaramond and MCPdigital by Macmillan Computer Publishing
Printed in the United States of America
Trademarks
All terms mentioned in this book that are known to be trademarks or service marks
have been appropriately capitalized. Sams Publishing cannot attest to the accuracy
of this information. Use of a term in this book should not be regarded as affecting
the validity of any trademark or service mark.
Contents
iii
Publisher
Richard K. Swadley
Marketing Manager
Gregg Bushyeager
Page Layout
Carol Bowers
Charlotte Clapp
Mary Ann Cosby
Aleata Howard
Louisa Klucznik
Casey Price
Jill Tompkins
Mark Walche
Dennis Wesner
Acquisitions Manager
Greg Wiegand
Assistant Marketing Manager
Michelle Milner
Development Manager
Dean Miller
Cover Designer
Tim Amrhein
Managing Editor
Cindy Morrow
Book Designer
Alyssa Yesh
Proofreading
Georgiana Briggs
Mona Brown
Michael Brumitt
Donna Harbin
Michael Henry
Kevin Laseau
Donna Martin
Acquisitions Editor
Chris Denny
Vice President of
Manufacturing and Production
Jeff Valler
Development Editor
Brad Jones
Manufacturing Coordinator
Paul Gilchrist
Production Editor
Cheri Clark
Indexer
Cheryl Dietsch
Greg Eldred
Imprint Manager
Kelly Dobbs
Editorial Coordinator
Bill Whitmer
Team Supervisor
Katy Bodenmiller
Editorial Assistants
Carol Ackerman
Sharon Cox
Lynette Quinn
Support Services Manager
Juli Cook
Technical Reviewer
Greg Guntle
Support Services Supervisor
Mary Beth Wakefield
Production Analysts
Angela Bannan
Dennis Clay Hager
Bobbi Satterfield
iv
C Programming: Just the FAQs
Overview
I
II
III
IV
V
VI
VII
VIII
IX
X
XI
XII
XIII
XIV
XV
XVI
XVII
XVIII
XIX
XX
XXI
Introduction ....................................................................................... xxix
The C Language ..................................................................................... 1
Variables and Data Storage ................................................................... 15
Sorting and Searching Data .................................................................. 31
Data Files ............................................................................................. 63
Working with the Preprocessor ............................................................ 87
Working with Strings ......................................................................... 115
Pointers and Memory Allocation ........................................................ 131
Functions ........................................................................................... 159
Arrays ................................................................................................. 175
Bits and Bytes ..................................................................................... 189
Debugging ......................................................................................... 197
Standard Library Functions ................................................................ 215
Times and Dates ................................................................................ 243
System Calls ....................................................................................... 255
Portability .......................................................................................... 275
ANSI/ISO Standards .......................................................................... 283
User Interface—Screen and Keyboard ................................................ 293
Writing and Compiling Your Programs ............................................. 315
Programming Style and Standards ...................................................... 331
Miscellaneous ..................................................................................... 349
Windows ............................................................................................ 385
Index .................................................................................................. 415
Contents
v
Contents
Introduction ............................................................................................. xxix
I
The C Language ........................................................................................... 1
I.1: What is a local block? ................................................................................ 1
Answer: ...................................................................................................... 1
Cross Reference: ......................................................................................... 3
I.2: Should variables be stored in local blocks? ................................................. 3
Answer: ...................................................................................................... 3
Cross Reference: ......................................................................................... 3
I.3: When is a
switch
statement better than multiple
if
statements? .................. 3
Answer: ...................................................................................................... 3
Cross Reference: ......................................................................................... 4
I.4: Is a default case necessary in a
switch
statement? ........................................ 4
Answer: ...................................................................................................... 4
Cross Reference: ......................................................................................... 5
I.5: Can the last case of a
switch
statement skip including the
break?
................ 5
Answer: ...................................................................................................... 5
Cross Reference: ......................................................................................... 5
I.6: Other than in a
for
statement, when is the comma
operator used? ............................................................................................... 6
Answer: ...................................................................................................... 6
Cross Reference: ......................................................................................... 7
I.7: How can you tell whether a loop ended prematurely? ................................ 7
Answer: ...................................................................................................... 7
Cross Reference: ......................................................................................... 8
I.8: What is the difference between
goto
and
longjmp()
and
setjmp()?
................ 8
Answer: ...................................................................................................... 8
Cross Reference: ....................................................................................... 10
I.9: What is an lvalue?.................................................................................... 10
Answer: .................................................................................................... 10
Cross Reference: ....................................................................................... 11
I.10: Can an array be an lvalue? ..................................................................... 11
Answer: .................................................................................................... 11
Cross Reference: ....................................................................................... 12
I.11: What is an rvalue? ................................................................................. 12
Answer: .................................................................................................... 12
Cross Reference: ....................................................................................... 12
I.12: Is left-to-right or right-to-left order guaranteed for
operator precedence? ................................................................................... 12
Answer: .................................................................................................... 12
Cross Reference: ....................................................................................... 13
Plik z chomika:
musli_com
Inne pliki z tego folderu:
A Book on C_ Programming in C (4th ed.) [Kelley & Pohl 1998-01-08].pdf
(48528 KB)
Advanced C and C Compiling [Stevanovic 2014-04-28].pdf
(29765 KB)
Embedded C Programming and the Atmel AVR (2nd ed.) [Barnett, Cox & O'Cull 2006-06-05].pdf
(82508 KB)
Beginning C for Arduino_ Learn C Programming for the Arduino and Compatible Microcontrollers [Purdum 2012-12-03].pdf
(28335 KB)
21st Century C [Klemens 2012-11-05].pdf
(7370 KB)
Inne foldery tego chomika:
3D Design - Programming
ActionScript
Actionscript - Flash - Flex - Air
Ada
ADO
Zgłoś jeśli
naruszono regulamin