C021TV-I2-S2
I.2 Algorithmics Tasks Elementary instructions Algorithmic culture Variables Elementary instructions Algorithmic culture
Variable ? A variable is a memory space where the program stores a value or a complex data structure. A variable is expected to change during execution of the program. 2
Variable ? A variable is a memory space where the program storages a value or a complex data structure. A variable is expected to change during execution of the program. Examples: The number of followers, of views on Youtube, of likes. . .(an integer) A pupil’s average (a real, or rather a floating point number) All the class’s marks (a chart, a chart of charts, a database) A hash table, a doubly linked list . . . 2
A variable Must be created (depends on the language) May be assigned: i ← 0 May be modified: i ← i+1 May be the program’s entry.
Variable types integers floating point numbers chart of. . . Pointers towards. . . Composed structures of. . .and . . .(and . . .) . . . a characters chain an interval