Transcription of A Quick Reference to C Programming Language
{{id}} {{{paragraph}}}
A Quick Reference to C Programming LanguageStructure of a C Program#include( )/* include IO library */# * include other files */# * define constants *//* Declare global variables*/)(variable type)(variable list);/* Define program functions */(type returned)(function name)(parameter list)(declaration of parameter types) {(declaration of local variables);(body of function code); }/* Define main function*/main ((optional argc and argv arguments))(optional declaration parameters){(declaration of local variables);(body of main function code);}CommentsFormat:/*(body of comment) */Example:/*This is a comment in C*/Constant DeclarationsFormat:#define(constant name)(constant value)Example:#define MAXIMUM 1000 Type DefinitionsFormat: typedef(datatype)(symbolic name);Example: typedef int KILOGRAMS;VariablesDeclarations:Format:( variable type)(name 1)(name 2),..;Example:int firstnum, secondnum;char alpha;int firstarray[10];int doublearray[2][5];char firststring[1O];Initializing:Format:(var iable type)(name)=(value);Example:int firstnum=5;Assignments:Format:(name)=(va lue);Example:firstnum=5;Alpha='a'; UnionsDeclarations:Format:union(tag){(ty pe)(member name); (type)(member name).}
A Quick Reference to C Programming Language Structure of a C Program # include( stdio.h) /* include IO library */ # include ... /* include other files */
Domain:
Source:
Link to this page:
Please notify us if you found a problem with this document:
{{id}} {{{paragraph}}}
Preface to the Digital Edition, The C Programming Language, Objective-C Programming Language, Objective-C language, Language, Programming, Objective-C, C Programming Tutorial, The C language, TUTORIAL, Programming language, C LANGUAGE TUTORIAL, C Programming Language, Essential C, The C, Programming Languages: Application and, Programming Languages: Application and Interpretation, Programming in C: Basics