Question | Answer |
stdio.h | Bibliothèque: •entrées / sorties •types •définition de macro ♦ Toujours l'intégrer au programme ♦ |
stdlib.h | Bibliothèque : •conversion numériques • allocation de mémoire |
string.h | Bibliothèque : • fonction sur les chaines de caractères |
math.h | Bibliothèque : • fonctions mathématiques |
Variables | ... |
char | Type: Caractères 1 octet *Valeurs* |
int | Type: Entier *Taille* *Valeurs* |
float | Type: Nombre (max 6 décimales) *Taille* *Valeurs* |
double | Type: Nombre (max 10 décimales) *Taille* *Valeurs* |
Déclaration de Variables | Allocation d'espace mémoire auquel on associe un nom > type nom; ex: int car_number; |
Initialisation de Variables | >nom = valeur ; OU >type nom = valeur; (Déclaration + Initialisation) |
%d | Specifier for integers -32768 to +32767 |
%f | Specifier for floating-point |
%c | Specifier for a character |
%s | Specifier for a string of characters |
scanf() | Requires 2 arguments in the brackets specifying type of data inputted and where to store it to |
long int | Usually default of int and has range of values from -2,147,483,647 to +2,147,483,648 |
short int | Saves memory space and has range of values from -32,768 to +32,767 |
Static Variable | Defined outside function, can be used inside using "extern int [variable name];" |
Casting | Process of forcing a variable into a variable of a different data type variable2 = (modifier data-type) variable1; [ float2int = (int)num; ] |
Translating Stage of Compilation | Compiler translates high-level language in .i file to low-level Assembly language instructions. Generated file is .s file |
Assembly Stage of Compilation | Assembler converts assembly language to machine code. Generated object file contains conversion in binary and is .o file |
Linking Stage of Compilation | Linker combines one or more binary object .o files into single executable file. Generated file is in binary and has .exe file |
Want to create your own Flashcards for free with GoConqr? Learn more.