In the statement scanf("%d", &kilometer);, kilometer is considered a variable because:
Before this statement, kilometer must have been declared as a variable
The & operator in &kilometer is the address-of operator.
It provides the memory address of the variable kilometer to the scanf function.
Variables are used to store data that can be modified during program execution.
For, While and Do are the looping statements of C++
Get instant updates and alerts directly from our site.
Install this app on your device for quick access right from your home screen.