• Adventure
  • Auto
  • Culture
  • Entertainment
  • Home & Garden
  • Money
  • Science
  • Tech
  • Video
  • Shows
  • Blogs
  • Quizzes
  • Games
  • Random Article
  • Computer
  • Electronics
  • Home > 
  • Tech > 
  • Computer > 
  • Computer Software > 
  • Programming

by Marshall Brain

Print
Cite This!
Close 
Please copy/paste the following text to properly cite this HowStuffWorks article:

Brain, Marshall.  "The Basics of C Programming"  01 April 2000.  HowStuffWorks.com. <http://computer.howstuffworks.com/c.htm>  10 February 2012.
Cite
Feedback

Future of Computers

Watch now
Watch now
Inside this Article
  1. Introduction to the Basics of C Programming
  2. What is C?
  3. The Simplest C Program
  1. The Simplest C Program: What's Happening?
  2. Variables
  3. Printf
  4. See more »
    1. Printf: Reading User Values
    2. Scanf
    3. Branching and Looping
    4. Looping: A Real Example
    5. Arrays
    6. More on Arrays
    7. Functions
    8. Functions: Function Prototypes
    9. Libraries
    10. Making a Library
    11. Makefiles
    12. Text Files
    13. Text Files: Opening
    14. Text Files: Reading
    15. Pointers
    16. Pointers: Why?
    17. Pointer Basics
    18. Pointers: Understanding Memory Addresses
    19. Pointers: Pointing to the Same Address
    20. Pointers: Common Bugs
    21. Using Pointers for Function Parameters
    22. Dynamic Data Structures
    23. Dynamic Data Structures: The Heap
    24. Dynamic Data Structures: Malloc and Free
    25. Advanced Pointers
    26. Pointers to Structures
    27. Pointers to Pointers
    28. A Linked Stack Example
    29. Using Pointers with Arrays
    30. Strings
    31. Special Note on Strings
    32. Operator Precedence
    33. Command Line Arguments
    34. Binary Files
    35. Lots More Information
    36. See all Programming articles

Lots More Information

Related Articles

  • How Boolean Logic Works
  • How Java Works
  • How CGI Scripting Works
  • How PERL Works
  • How BIOS Works
  • How Bits and Bytes Work

More Great Links

  • Cprogramming.com: Programming Tutorials
  • C Program Development Cycle
  • Introduction to Object-Oriented Programming Using C++
  • C Programming
  • comp.lang.c Frequently Asked Questions

VIDEO: Check out these videos about 3D Software and 11 incredible CAD videos. >>
Previous Page

Popular Tech Topics

The Ultimate Computer History Quiz
The Ultimate Computer History Quiz
Top 5 Myths About the Internet
Top 5 Myths About the Internet
How to Connect Your Computer to Your TV
How to Connect Your Computer to Your TV
How Capacitors Work
How Capacitors Work
How Cloud Computing Works
How Cloud Computing Works
Take a look at Computer Videos

You Might Also Like

How The Pirate Bay Works

File sharing is a controversial and, in many cases, illegal pastime. Sites that track BitTorrent files are already magnets for scrutiny. But with a name like The Pirate Bay, you know the site will get extra attention.

How Genuine Advantage Notifications Work

Microsoft's Genuine Advantage Notifications system can help users identify pirated Microsoft software. Learn more about GAN in this article.

Popular Articles

  • How to Use the Word 2010 Track Changes Feature
  • How Boolean Logic Works
  • How to Watch Free Movies on Your Computer
Inside this Article
  1. Introduction to the Basics of C Programming
  2. What is C?
  3. The Simplest C Program
  4. The Simplest C Program: What's Happening?
  5. Variables
  6. Printf
  7. Printf: Reading User Values
  8. Scanf
  9. Branching and Looping
  10. Looping: A Real Example
  11. Arrays
  12. More on Arrays
  13. Functions
  14. Functions: Function Prototypes
  15. Libraries
  16. Making a Library
  17. Makefiles
  18. Text Files
  19. Text Files: Opening
  20. Text Files: Reading
  21. Pointers
  1. Pointers: Why?
  2. Pointer Basics
  3. Pointers: Understanding Memory Addresses
  4. Pointers: Pointing to the Same Address
  5. Pointers: Common Bugs
  6. Using Pointers for Function Parameters
  7. Dynamic Data Structures
  8. Dynamic Data Structures: The Heap
  9. Dynamic Data Structures: Malloc and Free
  10. Advanced Pointers
  11. Pointers to Structures
  12. Pointers to Pointers
  13. A Linked Stack Example
  14. Using Pointers with Arrays
  15. Strings
  16. Special Note on Strings
  17. Operator Precedence
  18. Command Line Arguments
  19. Binary Files
  20. Lots More Information
  21. See all Programming articles
Previous Page

Popular Tech Videos

FPO
  • Cell Phone Tricks
  • Electronics Deconstructed
  • Ultimate Computer Hardware
  • How It's Made
  • Its All Geek To Me
  • See more»

New HSW Games

FPO
  • Storm Tracker
  • Memory Matrix
  • Crab Fishing Game
  • Volcano Explorer
  • Cannon Challenge
  • Speed Match
  • Lost in Migration
  • Word Bubbles
  • Color Match

Related Content

Prices: C Programming Books

  • Expert C Programming
    Expert C Programming

    Written for experienced C programmers who want to quickly pick up some of the insights and techniques of experts and master the fine arts of ANSI C, this volume passes on the wisdom of a highly experienced C compiler writer and his colleagues to help programmers reach new heights, and avoid common software pitfalls along the way. Using an original approach and a humorous style that makes deep knowledge both easy and accessible, it gathers into one place, tips, hints, shortcuts, guidelines, ideas, idioms, heuristics, tools, anecdotes, C folklore, and techniques that are often penciled in margins and on backs of papers by those working in the programming trenches—working on many different kinds of projects, over many, many years. Each chapter is divided into self-contained sections. Includes extended discussions of major topics such as declarations and arrays/pointers; offers a great many hints and mnemonics; covers topics that many C programmers find confusing; and features one of the best introductions to C++, and the rationale behind it. Throughout, technical details are interspersed with many true stories of how C programming works in practice, and each chapter ends with an amusing C story or piece of software folklore. For software engineers and computer programmers who are writing, developing, testing, debugging software on either IBM PCs or Unix systems.

    $30.19

  • C++ Programming Style
    C++ Programming Style

    C++ supports programming-in-the-large, allowing relationships between different parts of a program to be expressed. The scope of C++ programming style therefore goes beyond traditional in-the-small issues which relate to the details of line-by-line coding. This book examines the use of the in-the-large language features of C++, which sometimes confuse even experienced programmers. The author demonstrates that unwarranted use of the more powerful language features may lead to cluttered programs which are harder to comprehend and sometimes less efficient than more straightforward alternatives. Cargill rewrites several programs, using techniques that range from improving consistency to removing redundant inheritance. The presentation simulates a code review, in which readers may independently evaluate and criticize alternative approaches to programming problems, and then compare their analyses with those of the author. Design and coding style rules are distilled from the examples. Understanding and following these rules will help professional programmers design and write better C++ programs.A chapter is devoted to each of the following topics: *abstractions *operator overloading *consistency *wrappers *unnecessary inheritance *efficiency *virtual functions Building on the programming rules introduced in the first seven chapters, Cargill presents a case study in which a single program undergoes repeated transformations that improve its overall quality while reducing its size. The book concludes with a chapter on multiple inheritance. 0201563657B04062001

    $33.75

  • Applications Programming in C++
    Applications Programming in C++

    Exceptionally organized and beautifully illustrated, this state-of-the-art guide to C++ programming is a must-have for anyone who needs to learn the language. Exploring C++ programming's most useful aspects (as well as some of its more specialized parts), it focuses on using the language to write practical programs based on sound design techniques. Presents the must up-to-date coverage of C++ available - including a full section on STL (standard template library) - and offers many well-constructed examples, useful self-test exercises, beautifully fashioned sample applications, interesting and applicable programming exercises, lists of common programming errors, C++ Postscript sections that explain esoteric and less-used parts of the language, stunning illustrations, and up-to-date features. Includes a supplemental IBM-format program disk; a companion website contains the sourcecode, header files, and data files found on the disk as well as transparencies and an errata list.

    $109.42

HOWSTUFFWORKS
  • Adventure
  • Auto
  • Culture
  • Entertainment
  • Health
  • Home & Garden
  • Lifestyle
  • Money
  • Science
  • Tech
MORE STUFF
  • Blogs
  • Games
  • HSW Tools
  • RSS
  • Maps
  • Podcasts
  • Quizzes
  • Newsletters
  • Video
OUR WEBSITES
  • Animal Planet
  • Consumer Guide Auto
  • Consumer Guide Products
  • Discovery Channel
  • Discovery Fit & Health
  • HSW Brazil
  • HSW China HowStuffWorks China
  • Investigation Discovery
  • Oprah Winfrey Network
  • Planet Green
  • Science Channel
  • TLC
  • Discovery Education
  • Store
CUSTOMER SERVICE
  • Advertising
  • Contact Us
  • Help
CORPORATE
  • About Us
  • Careers @ Discovery
  • Privacy Policy
  • Visitor Agreement
TAKE US WITH YOU
FOLLOW US
© 1998-2012 HowStuffWorks, Inc