109k views
1 vote
Given an integer variable drivingAge that has already been declared, write a statement that assigns the value 17 to drivingAge .

User Jorden Vg
by
2.7k points

1 Answer

3 votes

Answer:

The code to this question as follows:

Code:

#include <stdio.h> //include header file for using basic function

int main() //defining main method

{

int drivingAge = 17; //defining integer variable that assign a value

printf("%d\\",drivingAge);//print value.

return 0;

}

Output:

17

Step-by-step explanation:

In the above C language code, firstly a header file is included this file is used for use basic function. In the next line, the main function is defined, inside the main method, an integer variable "drivingAge" is declared that holds a value that 17 and to print variable value the printf function is used that prints its value.

User Jordonias
by
3.4k points