224k views
3 votes
Type a C statement that declares and initializes variable taxRate to the value 0.085. Make sure to include a prefix 0 before typing the .085

User Tally
by
6.5k points

1 Answer

3 votes

Answer:

float taxRate = 0.085f

Explanation:

Variable initialisation in C (or any other programming language) is a way of declaring variable and assigning some values to the variable declared.

To initialise a variable in C, the data type, variable name and value are needed.

The following syntax must be obeyed when initialising a variable:

Data-type variable-name = value

Data-type represents which type of value is going to be stored in the variable.

Variable name, also known as identifier represents valid variable name (name of the allocated memory blocks for the variable).

Value represents the value or content of the declared variable.

User John Vincent
by
5.8k points