In the statement scanf("%d", &kilometer);, kilometer is a ?.
  1. Function
  2. Operator
  3. Variable
  4. Constant
Explanation

In the statement scanf("%d", &kilometer);, kilometer is considered a variable because:

  • Declaration:

Before this statement, kilometer must have been declared as a variable

  • Address of Operator:

The & operator in &kilometer is the address-of operator.

It provides the memory address of the variable kilometer to the scanf function.

  • Variable Usage:

Variables are used to store data that can be modified during program execution.


Comments

Leave a Reply

Your email address will not be published. Required fields are marked *

1 + 2 = ?



All Rights Reserved © TestPoint.pk