Karteikarten
C Programming
Karten in diesem Stapel (23)
- 1stdio.hContains input and output functions, types, and macro definitions. This library is used by most C programs and represents almost 1/3 of entire C libraries
- 2string.hContains functions for manipulating strings
- 3math.hContains mathematical functions
- 4stdlib.hContains utility functions for number conversion, storage allocation etc.
- 5Translating Stage of CompilationCompiler translates high-level language in .i file to low-level Assembly language instructions. Generated file is .s file
- 6Assembly Stage of CompilationAssembler converts assembly language to machine code. Generated object file contains conversion in binary and is .o file
- 7Linking Stage of CompilationLinker combines one or more binary object .o files into single executable file. Generated file is in binary and has .exe file
- 8VariablesA container in C which a data value can be stored inside the computer's memory
- 9charSingle byte storing 1 character
- 10intStores integer
[100] - 11floatStores floating-point to 6 decimal places
[0.123456] - 12doubleStores floating-point to 10 decimal places
[0.0123456789] - 13Declaring VariablesData type and variable name written, followed by ";"
[ int car_number; ] - 14Initialising VariablesWhen a value is assigned to a variable
[ int car_number = 0; ] - 15%dSpecifier for integers -32768 to +32767
[6554] - 16%fSpecifier for floating-point
[2.1564] - 17%cSpecifier for a character
[M] - 18%sSpecifier for a string of characters
[Hello World] - 19scanf()Requires 2 arguments in the brackets specifying type of data inputted and where to store it to
- 20long intUsually default of int and has range of values from -2,147,483,647 to +2,147,483,648
- 21short intSaves memory space and has range of values from -32,768 to +32,767
- 22Static VariableDefined outside function, can be used inside using "extern int [variable name];"
- 23CastingProcess of forcing a variable into a variable of a different data type
variable2 = (modifier data-type) variable1;
[ float2int = (int)num; ]
Informationen
- Beschreibung
- Notes on C language for Programming module of Comp Sci
- Erstellt von
- Miki Rana
- Aufrufe
- 495
- Tags
- Bewertung