چه کسانی این کتاب را می‌خوانند

دانشجوعلاقه‌مند یادگیری
کتابخوان حرفه‌ایلذت مطالعه
نویسندهالهام‌گیری

C For Dummies, 2nd Edition

Dan Gookin, Marcus B+ckmann

قیمت نهایی

۴۴٬۰۰۰ تومان۴۹٬۰۰۰ تومان۱۰٪ تخفیف
  • تخفیف زمان‌دار−۵٬۰۰۰ تومان

۵٬۰۰۰ تومان صرفه‌جویی نسبت به قیمت اصلی

نسخه اصلی و اورجینال

بلافاصله پس از خرید، فایل کتاب روی دستگاه شما آمادهٔ دانلود است.

تحویل فوری
پرداخت امن
ضمانت فایل
پشتیبانی

مشخصات کتاب

ناشر
For Dummies
سال انتشار
۲۰۰۴
فرمت
PDF
زبان
انگلیسی
حجم فایل
۸٫۳ مگابایت

دربارهٔ کتاب

while (dead_horse) beat (): If you’re like most people, the above seems like nonsense. Actually, it’s computer sense—C programming. After digesting C For Dummies, 2 nd Edition, you’ll understand it. C programs are fast, concise and versatile. They let you boss your computer around for a change. So turn on your computer, get a free compiler and editor (the book tells you where), pull up a chair, and get going. You won’t have to go far (page 13) to find your first program example. You’ll do short, totally manageable, hands-on exercises to help you make sense of: All 32 keywords in the C language (that’s right—just 32 words) The functions—several dozen of them Terms like printf(), scanf(), gets (), and puts () String variables, numeric variables, and constants Looping and implementation Floating-point values In case those terms are almost as intimidating as the idea of programming, be reassured that C For Dummies was written by Dan Gookin, bestselling author of DOS For Dummies , the book that started the whole library. So instead of using expletives and getting headaches, you’ll be using newly acquired skills and getting occasional chuckles as you discover how to: Design and develop programs Add comments (like post-it-notes to yourself) as you go Link code to create executable programs Debug and deploy your programs Use lint, a common tool to examine and optimize your code A helpful, tear-out cheat sheet is a quick reference for comparison symbols, conversion characters, mathematical doodads, C numeric data types, and more. C For Dummies takes the mystery out of programming and gets you into it quickly and painlessly. Team DDU C For Dummies, 2nd Edition 1 Cover 1 Table of Contents 12 Introduction 22 "What Will Understanding C Do for Me?" 22 About This Here Dummies Approach 23 How to Work the Examples in This Book 23 Foolish Assumptions 24 Icons Used in This Book 24 What's New with This Edition? 25 Final Thots 25 Part I: Introduction to C Programming 28 Chapter 1: Up from the Primordial C 30 An Extremely Short and Cheap History of the C Language 30 The C Development Cycle 32 From Text File to Program 32 The source code (text file) 33 Creating the GOODBYE C source code file 34 The compiler and the linker 35 Compiling GOODBYE C 36 Running the final result 37 Save It! Compile and Link It! Run It! 37 Chapter 2: C of Sorrow, C of Woe 40 The Required Woes of Editing and Recompiling 40 Reediting your source code file 41 Recompiling (or the C equivalent of the "do-over") 42 Dealing with the Heartbreak of Errors 43 Yikes! An error! But, before you shoot yourself 43 The autopsy 44 Repairing the malodorous program 45 Now try this error! 47 Chapter 3: C Straight 50 The Big Picture 50 C Language Pieces' Parts 51 The C Language Itself - the Keywords 53 Other C Language Components 55 Pop Quiz! 56 The Helpful RULES Program 57 The importance of being \n 57 Breaking up lines\ is easy to do 58 Chapter 4: C What I/O 60 Introduce Yourself to Mr Computer 60 Compiling WHORU C 61 The reward 62 More on printf() 62 Printing funky text 63 Escape from printf()! 65 The f means "formatted" 67 A bit of justification 68 scanf Is Pronounced "Scan-Eff" 70 Putting scanf together 70 The miracle of scanf() 72 Experimentation time! 73 Chapter 5: To C or Not to C 76 Adding Comments 76 A big, hairy program with comments 77 Why are comments necessary? 79 Comment Styles of the Nerdy and Not-Quite-Yet-Nerdy 79 Bizarr-o comments 80 C++ comments 81 Using Comments to Disable 82 The Perils of "Nested" Comments 83 Chapter 6: C More I/O with gets() and puts() 86 The More I Want, the More I gets() 86 Another completely rude program example 87 And now, the bad news about gets() 88 The Virtues of puts() 88 Another silly command-prompt program 89 puts() and gets() in action 89 More insults 90 puts() can print variables 91 Part II: Run and Scream from Variables and Math 94 Chapter 7: A + B = C 96 The Ever-Changing Variable 96 Strings change 97 Running the KITTY 98 Welcome to the Cold World of Numeric Variables 98 Hello, integer 99 Using an integer variable in the Methuselah program 100 Assigning values to numeric variables 101 Entering numeric values from the keyboard 102 The atoi() function 102 So how old is this Methuselah guy, anyway? 104 You and Mr Wrinkles 106 A Wee Bit o' Math 107 Basic mathematical symbols 107 How much longer do you have to live to break the Methuselah record? 109 Bonus modification on the final Methuselah program! 111 The direct result 112 Chapter 8: Charting Unknown Cs with Variables 114 Cussing, Discussing, and Declaring Variables 114 "Why must I declare a variable?" 115 Variable names verboten and not 116 Presetting variable values 117 The old random-sampler variable program 119 Maybe you want to chance two pints? 120 Multiple declarations 121 Constants and Variables 122 Dreaming up and defining constants 122 The handy shortcut 123 The #define directive 125 Real, live constant variables 127 Chapter 9: How to C Numbers 128 There Are Numbers, and Then There Are Numbers 128 Numbers in C 129 Why use integers? Why not just make every number floating-point? 131 Integer types (short, long, wide, fat, and so on) 131 Signed or unsigned, or "Would you like a minus sign with that, Sir?" 132 How to Make a Number Float 134 "Hey, Carl, let's write a floating-point number program!" 135 The E notation stuff 137 Bigger than the Float, It's a Double! 139 Formatting Your Zeroes and Decimal Places 140 Chapter 10: Cook That C Variable Charred, Please 142 The Other Kind of Variable Type, the char 142 Single-character variables 143 Char in action 144 Stuffing characters into character variables 145 Reading and Writing Single Characters 146 The getchar() function 147 The putchar() function 148 Character Variables As Values 149 Part III: Giving Your Programs the Ability to Run Amok 152 Chapter 11: C More Math and the Sacred Order of Precedence 154 An All-Too-Brief Review of the Basic C Mathematical Operators 154 The old "how tall are you" program 156 Unethical alterations to the old "how tall are you" program 157 The Delicate Art of Incrementation (Or, "Just Add One to It") 158 Unhappily incrementing your weight 159 Bonus program! (One that may even have a purpose in life) 161 The Sacred Order of Precedence 162 A problem from the pages of the dentistry final exam 162 What's up, Sally? 163 The confounding magic-pellets problem 165 Using parentheses to mess up the order of precedence 166 Chapter 12: C the Mighty if Command 168 If Only 168 The computer-genie program example 169 The if keyword, up close and impersonal 171 A question of formatting the if statement 175 The final solution to the income-tax problem 176 If It Isn't True, What Else? 178 Covering all the possibilities with else 179 The if format with else 180 The strange case of else-if and even more decisions 181 Bonus program! The really, really smart genie 184 Chapter 13: What If C==C? 186 The World of if without Values 186 Which is greater: S or T, $ or ̈C? 187 The problem with getchar() 189 Fixing GREATER C to easily read standard input 191 "Can I get getchar() to read only one character?" 192 Meanwhile, back to the GREATER problem 192 Another, bolder example 194 Using the if Keyword to Compare Two Strings 195 Chapter 14: Iffy C Logic 196 Exposing Flaws in logic 196 If, And, Or, But 198 A solution (but not the best one) 198 A better solution, using logic 199 The if command's logical friends 201 A logical AND program for you 204 Chapter 15: C You Again 206 For Going Loopy 206 Repetitive redundancy, I don't mind 208 For doing things over and over, use the for keyword 209 Tearing through OUCH C a step at a time 211 Having fun whilst counting to 100 213 I'm Bustin' Outta Here! 214 At last - the handy ASCII program 214 Beware of infinite loops! 216 Breaking out of a loop 218 The break keyword 219 Chapter 16: C the Loop, C the Loop++ 222 The Art of Incrementation 222 Cryptic C operator symbols, Volume I: The inc operator (++) 223 Another look at the LARDO C program 224 The Mysterious Practice of Decrementation 225 O, to count backward 226 How counting backward fits into the for loop 227 Cryptic C operator symbols, Volume II: The dec operator (--) 228 A final improvement to OLLYOLLY C 229 More Incrementation Madness 230 Leaping loops! 231 Counting to 1,000 by fives 232 Cryptic C operator symbols, Volume III: The madness continues 232 The answers 234 Chapter 17: C You in a While Loop 236 The Lowdown on while Loops 236 Whiling away the hours 237 The while keyword (a formal introduction) 239 Deciding between a while loop and a for loop 240 Replacing those unsightly for(;;) loops with elegant while loops 241 C from the inside out 243 Not to Beat a Dead Horse or Anything 244 Chapter 18: Do C While You Sleep 246 The Down-Low on Upside-Down do-while Loops 246 The devil made me do-while it! 247 do-while details 248 A flaw in the COUNTDWN C program 249 The always kosher number-checking do-while loop 250 Nested Loops and Other Bird-Brained Concepts 252 Adding a tense, dramatic delay to the COUNTDWN C program 252 The nitty GRID C of nested loops 255 Break the Brave and Continue the Fool 256 Please continue 257 The continue keyword 258 Chapter 19: Switch Case, or, From 'C' to Shining 'c' 260 The Sneaky switch-case Loops 260 The switch-case Solution to the LOBBY Program 262 The Old switch-case Trick 264 The Special Relationship between while and switch-case 269 Part IV: C Level 272 Chapter 20: Writing That First Function 274 Meet Mr Function 274 A silly example you don't have to type 275 A potentially redundant program in need of a function 276 The noble jerk() function 277 How the jerk() function works in BIGJERK2 C 278 Prototyping Your Functions 279 Prototypical prototyping problems 280 A sneaky way to avoid prototyping problems 281 The Tao of Functions 283 The function format 283 How to name your functions 284 Chapter 21: Contending with Variables in Functions 286 Bombs Away with the BOMBER Program! 286 Will the dual variable BOMBER C program bomb? 288 Adding some important tension 288 How We Can All Share and Love with Global Variables 290 Making a global variable 291 An example of a global variable in a real, live program 292 Chapter 22: Functions That Actually Funct 296 Marching a Value Off to a Function 296 How to send a value to a function 297 An example (and it's about time!) 298 Avoiding variable confusion (must reading) 300 Sending More than One Value to a Function 301 Functions That Return Stuff 303 Something for your troubles 303 Finally, the computer tells you how smart it thinks you are 305 Return to sender with the return keyword 306 Now you can understand the main() function 308 Give that human a bonus! 309 No Need to Bother with This C Language Trivia If You're in a Hurry 310 Chapter 23: The Stuff That Comes First 314 Please Don't Leave Me Out! 315 Say! Aren't you the #include construction? 315 What's up with STDIO H? 318 Writing your own dot-H file 319 A final warning about header files 321 What the #defines Are Up To 323 Avoiding the Topic of Macros 324 Chapter 24: The printf() Chapter 326 A Quick Review of printf() 326 The Old Displaying-Text-with-printf() Routine 327 The printf() Escape Sequences 327 The printf() escape-sequence testing program deluxe 328 Putting PRINTFUN to the test 329 The Complex printf() Format 331 The printf() Conversion Characters 332 Chapter 25: Math Madness! 334 More on Math 334 Taking your math problems to a higher power 335 Putting pow() into use 336 Rooting out the root 338 Strange Math? You Got It! 340 Something Really Odd to End Your Day 341 The perils of using a++ 341 Oh, and the same thing applies to a -- 343 Reflections on the strange ++a phenomenon 343 Chapter 26: The Old Random-Number Function 346 On Being Random 346 Using the rand() function 347 Planting a random-number seed 349 Randoming up the RANDOM program 350 Streamlining the randomizer 352 The Diabolical Dr Modulus 354 Rolling the Dice with the Final RANDOM Program 356 Part V: Part of Tens 358 Chapter 27: Ten More Things You Need to Know about the C Language 360 Arrays 360 Strings 361 Structures 362 Pointers 364 Linked Lists 364 Binary Operators 365 Interacting with the Command Line 366 Disk Access 366 Interacting with the Operating System 366 Building Big Programs 367 Chapter 28: Ten Tips for the Budding Programmer 368 Use the Command-Line History 368 Keep Your Editor Open in Another Window 369 Use a Context-Colored Text Editor 369 Know the Line-Number Commands in Your Editor 370 Keep a Command Prompt Window Open If You're Using the IDE 371 Know a Few Handy Command-Prompt Commands 371 Carefully Name Your Variables 372 Know Your Post- and Pre-Incrementing and Decrementing Riddles 372 Breaking Out of a Loop 373 Chapter 29: Ten Ways to Solve Your Own Programming Problems 374 Work on One Thing at a Time 375 Break Up Your Code 375 Simplify 376 Talk through the Program 376 Set Breakpoints 377 Monitor Your Variables 377 Document Your Work 377 Use Debugging Tools 378 Use a C Optimizer 378 Read More Books! 379 Appendix A: The Stuff You Need to Know before You Read All the Other Stuff in This Book 380 Setting Things Up 380 The C language compiler 381 The place to put your stuff 382 Making Programs 384 Finding your learn directory or folder 384 Running an editor 385 Compiling and linking 386 Appendix B: ASCII Table 392 Index 398 Team DDU 1 Find out how to tell your computer what to do Design and develop programs, compile and link code, fix problems, and more Come "C" what all the excitement’s about! C programs are fast, concise, and versatile, and you’ll be writing them in no time. This friendly book unlocks the mysteries of coding, compiling, adding comments, and using keywords, I/O, variables, integers, and all the rest. You’ll write your first C program before you finish Chapter 1! The Dummies Way Explanations in plain English "Get in, get out" information Icons and other navigational aids Tear-out cheat sheet Top ten lists A dash of humor and fun Discover how to: Understand the entire program development cycle Link code to create executable programs Debug and deploy your programs Use floats, integer variables, and if statements Write functions and use loops

قیمت نهایی

۴۴٬۰۰۰ تومان