Download ArticleDownload Article

This article's purpose is not to teach you C. Instead, its aim is to help you understand what it takes to be an efficient programmer in C.

  1. How.com.vn English: Step 1 Before anything else, you are going to need a text editor.
    Each operating system has its own editors already installed (Windows has Notepad, Linux distributions have Kwrite etc), but consider getting another. Notepad++ is an excellent editor you can use (and not only to write C code).
  2. 2
    If you have no programming experience, learning C might not be a good idea, for it is known to be a difficult and tricky language.
    Advertisement
  3. How.com.vn English: Step 3 Understand that you need to invest a serious amount of your time learning C.
    Programming is a science that requires a lot of reading, patience, constant practising, versatility and an open mind.
  4. How.com.vn English: Step 4 Read books that explain C's syntax and lexis.
    Study example algorithms and the use of various libraries.
  5. How.com.vn English: Step 5 Cooperate with others.
    Ask more experienced programmers about various programming techniques, tips and tricks in C. There are more than one ways to code the same thing. Some of them are easier, some are more advanced. The way you write your code depends on your programming style.
  6. 6
    Don't bite more than you can chew. Start slowly and steady. Experience and skill comes with time.
  7. How.com.vn English: Step 7 Experiment.
    Download free source code in C and start tweaking things, adding or removing lines etc. See what's happening and try to understand why it happened. No book will magically turn you into a programmer. If you don't practise and experiment, you will never learn.
  8. How.com.vn English: Step 8 In order to...
    In order to execute your C programs, you are going to need a compiler like GCC. Let's say that you have a file named test.c, which you want to compile. Go to the directory of that file and type gcc test.c -o test
    • gcc: the command that orders GCC to compile your code.
    • test.c: the name of the file you want compiled.
    • -o: a flag that stands for output. Tells GCC to actually compile your file.
    • test: the name of your executable. Once compiled, type test to run it
  9. Advertisement

Expert Q&A

Search
Add New Question
  • Question
    How do I get started with writing in C++?
    How.com.vn English: Tyrone Showers
    Tyrone Showers
    Technologist
    Tyrone Showers is a Technologist and the Co-owner of Taliferro Group, an IT consulting company based in Seattle, Washington. With over 35 years of professional experience, he specializes in API Design, e-Commerce, Operational Efficiency, and website development. He has a B.S. in Computer Science from DeVry Institute of Technology.
    How.com.vn English: Tyrone Showers
    Technologist
    Expert Answer
    To begin coding in C++, start by grasping fundamental programming concepts such as variables, data types, loops, and conditions—the essential building blocks applicable to any programming language, including C++. Obtain a C++ compiler and specialized software for translating your code into a format that is understandable and executable by your computer. For Windows, consider Microsoft Visual C++; for macOS, opt for Xcode. Once your compiler is set up, initiate basic programs, like one displaying "Hello, World!" on your screen. This initial exercise familiarizes you with coding processes like writing, compiling, and executing.
Ask a Question
200 characters left
Include your email address to get a message when this question is answered.
Submit
      Advertisement

      Video

      Tips

      • Don't try to avoid mistakes; embrace them. Making mistakes is the most important part in learning how to program.
      • Always add comments to your programs. Not only does this help others who might take a look at its source code, but also it helps you remember what you're writing and why. You may know what you're doing the moment that you're writing your code, but after two or three months, you won't remember much.
      • Your source code needs to have a *.c extension, so that your compiler can understand that it's a C source file.
      Submit a Tip
      All tip submissions are carefully reviewed before being published
      Thanks for submitting a tip for review!
      Advertisement

      Expert Interview

      Thanks for reading our article! If you’d like to learn more about programming, check out our in-depth interview with Tyrone Showers.

      About This Article

      How.com.vn English: Tyrone Showers
      Co-authored by:
      Technologist
      This article was co-authored by Tyrone Showers. Tyrone Showers is a Technologist and the Co-owner of Taliferro Group, an IT consulting company based in Seattle, Washington. With over 35 years of professional experience, he specializes in API Design, e-Commerce, Operational Efficiency, and website development. He has a B.S. in Computer Science from DeVry Institute of Technology. This article has been viewed 46,669 times.
      How helpful is this?
      Co-authors: 16
      Updated: January 3, 2024
      Views: 46,669
      Thanks to all authors for creating a page that has been read 46,669 times.

      Reader Success Stories

      • How.com.vn English: Jarvis

        Jarvis

        Jun 29, 2016

        "This article gave me a brief idea about C and where should I start learning."
      Share your story

      Is this article up to date?

      ⚠️ Disclaimer:

      Content from Wiki How English language website. Text is available under the Creative Commons Attribution-Share Alike License; additional terms may apply.
      Wiki How does not encourage the violation of any laws, and cannot be responsible for any violations of such laws, should you link to this domain, or use, reproduce, or republish the information contained herein.

      Notices:
      • - A few of these subjects are frequently censored by educational, governmental, corporate, parental and other filtering schemes.
      • - Some articles may contain names, images, artworks or descriptions of events that some cultures restrict access to
      • - Please note: Wiki How does not give you opinion about the law, or advice about medical. If you need specific advice (for example, medical, legal, financial or risk management), please seek a professional who is licensed or knowledgeable in that area.
      • - Readers should not judge the importance of topics based on their coverage on Wiki How, nor think a topic is important just because it is the subject of a Wiki article.

      Advertisement