Ask Question

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

+4
Answers (1)
  1. 6 September, 20:59
    0
    The code to this question as follows:

    Code:

    #include / /include header file for using basic function

    int main () / /defining main method

    {

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

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

    return 0;

    }

    Output:

    17

    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.
Know the Answer?
Not Sure About the Answer?
Find an answer to your question 👍 “Given an integer variable drivingAge that has already been declared, write a statement that assigns the value 17 to drivingAge. ...” in 📗 Computers & Technology if the answers seem to be not correct or there’s no answer. Try a smart search to find answers to similar questions.
Search for Other Answers