Hungarian notation for variables
A naming style where a variable name starts with a short lower-case prefix showing its data type, e.g. strName, intAge, fltPrice, blnPassed.
Understanding Hungarian notation for variables in VCE Software Development U3O1
What it does: The int prefix shows an integer, and the descriptive part StudentAge starts with capital letters (camel casing) after the lower-case prefix. The flt prefix shows a floating point (decimal) number, so fltPrice suits a value like 4.50. The prefix str stands for string, so strSurname holds text. intName is misleading because int means integer, but the value is text. strName is correct for a string. The bln prefix marks a Boolean variable, so blnPassed holds True or False, such as whether a student passed. A Hungarian notation prefix must match the data type actually stored, otherwise the name misleads anyone reading the code.
Common mistakes: The value 12.50 is a floating point number, so the prefix should be flt, not int. The line should be fltPrice = 12.50. 270000 is a whole number, so the prefix should be int, not str. The line should be intPopulation = 270000.
Free printable worksheet with full answer key — or add this module to a class and your students practise it interactively.
This module's key terms are also in a printable crossword (Modules 48–71) and word search (Modules 10–71).
Take this worksheet further — free with Cloodit
Each concept is reinforced from every angle — learned, then applied, then tested.
Cloodit turns curriculum-aligned coding content into journeys students work through one biome at a time.
Over 100 of them, across seven natural biomes.
Turns their work into revision material ready for Flash Cards and Exam study.
Live, competitive practice for the start of the lesson or a teacher-led lesson finisher.
Honour your top performers, or encourage a student who's trying hard — ready to print in seconds.
Quick Questions
Match the Pairs
Key Term
Hungarian notationFill in the Blanks
Spot the Error
Student with a class code? Join your class →