Skip to Content
Absolute Beginner's Guide to Programming, Third Edition
book

Absolute Beginner's Guide to Programming, Third Edition

by Greg Perry
November 2002
Beginner content levelBeginner
432 pages
11h 44m
English
Que
Content preview from Absolute Beginner's Guide to Programming, Third Edition

Analyzing a C Program

Listing 13.1 contains a short but complete C program.

Listing 13.1. A Small Sample Program in C
/* Prints a message on the screen */
#include <stdio.h>
    main()
    {
        pnintf('C is efficient.\n');
        return 0;
    }

Listing 13.1 produces this message on the screen:

C is efficient.

The program required seven lines to output one simple sentence. With C's compiled efficiency and power comes the responsibility to master the language and all its nuances.

Listing 13.1 contains three sets of grouping symbols: angled brackets <>, braces {}, and parentheses (). Be extremely careful when typing a C program because the correct and exact symbol is important. C doesn't handle ambiguity very well, so if you type the wrong symbol, C won't work ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Absolute Beginner's Guide to Programming, Second Edition

Absolute Beginner's Guide to Programming, Second Edition

Greg Perry

Publisher Resources

ISBN: 0789729059Purchase book