0% found this document useful (0 votes)
67 views3 pages

A Little C Primer

This document provides an introduction to the C programming language. It discusses the history and uses of C, from its origins with UNIX to modern operating systems like Windows. It also outlines the table of contents, which covers C fundamentals like variables, operators, input/output, functions, and more. The document recommends downloading a C compiler and IDE like Visual C++ to get started with writing C programs on your computer.

Uploaded by

Iordache Andrei
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
67 views3 pages

A Little C Primer

This document provides an introduction to the C programming language. It discusses the history and uses of C, from its origins with UNIX to modern operating systems like Windows. It also outlines the table of contents, which covers C fundamentals like variables, operators, input/output, functions, and more. The document recommends downloading a C compiler and IDE like Visual C++ to get started with writing C programs on your computer.

Uploaded by

Iordache Andrei
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

A Little C Primer

Contents
1 Tools For Programming
2 Table of Contents
2.1 Introduction to C; Functions; Control Constructs
2.2 C Variables, Operators & Preprocessor Directives
2.3 C Input & Output
2.4 C Library Functions & Other Comments
2.5 C Quick Reference
2.6 Comments and Revision History
3 Resources and Licensing

This document is a quick introduction to the C programming language. It is written by a novice, and is intended
for use by a novice. However, it does assume familiarity with a programming language.

The C programming language is a "middle-level" language. It provides low-level programming capability at the
expense of some user-friendliness. Cynics tend to claim that C combines the flexibility and power of assembly
language with the user-friendliness of high-level language, but experience programmers find that the limited set
of keywords and the use of pointers allows for fast and elegant programming solutions. C first rose to
popularity with the growth of UNIX, and has been used creating the Windows operating system from its
earliest versions. It is also used in microcontrollers and super-computers.

The original implementations of C were defined as described in the classic reference, THE C
PROGRAMMING LANGUAGE, authored by Brian Kernighan and Dennis Ritchie. This definition left a few
things to be desired, and the American National Standards Institute (ANSI) formed a group in the 1980s to
create a complete specification. The result was "ANSI C", which is the focus of this document.

Tools For Programming


If you are new to programming then there are certain "tools" you need. The good news is that these tools are
readily available for free and can be downloaded immediately. One of the major obstacles for beginners is the
idea of using a compiler. A compiler is a program that takes your "code" (which is the technical term for the
lines of programming language that you will write) and "compiles" it into an executable (every time you click
an *.exe to install a program you are essentially running code that has been compiled and is ready to install or
use on your computer).

When most people start to program in C, the first question they ask is "Where are the windows that I see in MS
Word?" It's only natural in a graphics dominated computer world to want to create a graphical interface for your
program. The easiest way to write a Windows "style" program in C is by downloading Visual C++ (from
Microsoft). This IDE (Integrated Development Environment) allows you to call the GUI (Graphical User
Interface) provided by Microsoft where all the buttons, windows, dialog boxes, etc are already designed and
ready for use in your program. If you are just starting out then Microsoft provides a free version of Visual C++
with features and functionality that almost matches the professional version.

Though the programming examples given in this book are not GUI based you can still use Visual C++ to
compile them. It's also a good idea to learn to create simple, command-line programs before moving on to
GUIs. Please note that there are many free C and C++ compilers and coding tools offered by companies other
than Microsoft. If you wish to try another IDE, forums and freeware sites are ideal places to find out about
these.

Table of Contents
Introduction to C; Functions; C ontrol Constructs

An Introductory C Program
C Functions in Detail
C Control Constructs

C Variables, Operators & Pr eprocessor Directives

C Variables, Declarations and Constants


C Operators
C Preprocessor Directives

C Input & Output


C Console IO
C File-IO Through Library Functions
C File-IO Through System Calls

C Library Functions & Other Comments

C Math Library
C Standard Utility Library & Time Library
The C sprintf Function
C String Function Library
C Character Class Test Library
C Command Line Arguments
Pointers to C Functions
C Dynamic Memory Allocation & Deallocation
Common Programming Problems in C

C Quick Reference
C Quick Reference

Comments and Revision History

Comments and Revision History

Resources and Licensing


Resources
Licensing

Retrieved from "https://en.wikibooks.org/w/index.php?title=A_Little_C_Primer&oldid=3248555"

This page was last edited on 30 July 2017, at 23:52.


Text is available under the Creative Commons Attribution-ShareAlike License.; additional terms may
apply. By using this site, you agree to the Terms of Use and Privacy Policy.

You might also like