C LANGUAGE Flashcards
Who invented C programming language
Dr. Dennis Ritchie
considered as a middle-level programming language because it combined the power of low-level language (such as Assembly language) and the elegance of high-level language like Pascal.
C language
are programs embedded inside Integrated Circuits (IC) or chips..
Embedded intelligence systems
do not provide all the built-in functions found in high-level languages, but to provide all building blocks needed to produce the result desired. Examples: C, C++
Middle-Level languages
provide almost everything that the programmer might need to do as already built into the language. Example: Java, Python
High-Level languages
provide nothing other than access to the machines basic instruction set. Example: Assembler
Low-Level languages
This is a preprocessor command that includes a standard input-output header file from the C library before compiling a C program.
include <stdio.h></stdio.h>
This is the main function from where the execution of any C program begins
int main()
This indicates the beginning of the main function.
{
- whatever is given inside the command “/* */” in any C program, won’t be considered for compilation and execution.
*/ */
command prints the output onto the screen.
printf
This command waits for any character input from the keyboard.
getch(); / getche();
- This command terminates C program (main function)
return 0
This indicates the ending of the main function
}
is a macro preprocessor (allows you to define macros) that transforms programs before it is compiled. These transformations can be included such as in a header file. It usually starts with a (#) pound sign.
The C preprocessor
it is used to include header files to a C program. #include <stdio.h> #include<my_header.h></my_header.h></stdio.h>
include preprocessor
it is used to define a fragment of code that is given with a name. #define PI 3.1416
define
are distinguished by ending in the extension.h.
it is used to define all functions, variables, and constants contained in any function that the users want.
Header files
input and output functions.
stdio.h
console input and output functions.
conio.h
character handling functions
ctype.h
mathematics functions
math.h
string functions
string.h
date and time functions
time.h