C Programming: BTM 3234 Manufacturing Computer Application
C Programming: BTM 3234 Manufacturing Computer Application
C Programming: BTM 3234 Manufacturing Computer Application
BTM 3234 1
C Programming terms
Terms Definition
BTM 3234 3
BTM 3234 4
The very first line is preprocessor command, which tells a C compiler to
#include <stdio.h> file before going to actual compilation.
The next line int main() is the main function where the program execution
begins
The next line printf(…) is another function available in C which causes the
message “Hello World!” to be displayed on the screen.
The next line return 0; terminates the main() function and returns the value
0.
BTM 3234 5
stdlib.h • Standard Library
• Contains header information for
‘Memory Allocation/Freeing’
functions
malloc() • This function is used to allocate
space in memory during the
execution of the program
calloc() • This function is also like malloc()
function. But calloc() initializes the
allocated
realloc() • This function modifies the allocated
memory size by malloc() and calloc()
functions to new size
free() • This function frees the allocated
memory by malloc(), calloc(),
realloc() functions and returns the
memory to the system.
BTM 3234 6
Escape Sequences Definition
\b • Backspace
\f • Form Feed
\n • Newline
\r • Return
\t • Horizontal tab
\v • Vertical tab
\\ • Backslash
\? • Question mark
\0 • Null Character
BTM 3234 7