ALFATIHAH OR Any recitation based on one’s believes & faith .

. getchar()..h.. dynamic storage..h … • printf().h. etc . while…) • Suitable for top-down solution algorithm • C is also a procedural language  programs can break into multiple modules called functions • Standard functions  provided by run-time library • stdio. math.INTRODUCTION • C – structured language : • Sequential statement • Selection statement (if. utilib. sqrt() … • input/output.else) • Repetition statement (do.while. for. mathematical. string.

Pre-processor statement / library main() function  entry point for all programs / start here all C statements MUST end with “.*/ OR //…. getchar()  functions imported from library stdio.A COMPLETE C PROGRAM Comments  will not be executed by compiler /*….” All functions / modules / blocks must start with { and end with } printf().h . scanf().

• Ignored by the C compiler and do not cause any machine-language object code to be generated.  only for single line comments • No need to end with “.” • Do not cause the computer to perform any action when the program is run.. */  usually use for multiple line comments • // ….1. COMMENTS • Format : • /* …. • Use for document programs and improve program readability. • Help other people read and understand your program .

• Line 7 tells the preprocessor to include the contents of the standard input/output header (<stdio. #endif  to create new library • #include “name of custom-made library  to import custom-made library • # are processed by the preprocessor before compilation. • This header contains information used by the compiler when compiling calls to standard input/output library functions such as printf() & scanf() • # can also be used to create new library.h>) in the program.2. PREPROCESSOR DIRECTIVES • Format : • #include <name of library> to import standard C library • #define. #ifndefine. import custom-made library or any pre-processing tasks before compilation .

send by the caller • Function name  to be given by programmer .3. • If the C program consists of >1 files. main() Function • Format : • <return_data_type> <function_name> (<list_arguments>) • void main( ) • main() function is the entry point in C program. there will be ONLY 1 main() function • Return data type  what kind of data will be returned by the function once its execution in completed void  no data returned • List of arguments  list of data to be received by the function.

• This pair of braces and the portion of the program between the braces is called a block . ends each function (line 21). main() Function • A left brace. begins the body of every function (line 11).3. {. }. • A corresponding right brace.

• Namely to print on the screen the string of characters marked by the quotation marks • Like any other statement. printf() must end with “. printf(“conversion specifier”.” • Conversion specifier  types of data that need to be displayed • Address operator = “&” = the address of the variable in memory .<address operator+variable name>). Output statement – printf() • Format : printf(“<statement>”).4.

5. Escape Sequence • Format : ###BOT_TEXT###lt;special character> • “\” is called escape character. Combining “\” with a set of special character will form escape sequence • Escape sequence  to instruct printf to do special task .

<address operator+variablename>). • To get standard input from user  keyboard • Must end with “.” • Conversion specifier  types of data that need to be displayed • Address operator = “&” = the address of the variable in memory . Input statement – scanf() • Format : scanf(“<conversion specifier>”.6.