A Quick Reference to C Programming Language
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 1000Type 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 */
Download A Quick Reference to C Programming Language
Information
Domain:
Source:
Link to this page:
Please notify us if you found a problem with this document:
Related search queries
Objective-C Programming Language, Objective-C language, Language, Programming, Objective-C, TUTORIAL, Programming language, Programming Languages: Application and, Programming Languages: Application and Interpretation, The C Programming Language, Programming in C: Basics, Essential C, C programming language, C LANGUAGE TUTORIAL, C Programming Tutorial, The C language, Preface to the Digital Edition, The C