Ask Question
18 March, 14:36

eclare an integer variable named myNewAge. Declare and initialize an integer variable named myCurrentAge. Initialize this variable with your current age.

+5
Answers (1)
  1. 18 March, 14:47
    0
    The code to this question as follows:

    Code:

    #include #defining header file

    int main () / /defining main method

    {

    //your code defined here ...

    int myNewAge; / /declaring integer variable myNewAge

    int myCurrentAge=21; / /declaring integer variable myCurrentAge and initialize a value.

    printf ("myCurrentAge: %d", myCurrentAge); / /print myCurrentAge variable value.

    return 0;

    }

    Output:

    myCurrentAge: 21

    Explanation:

    In the above C language program code, firstly the header file is included, then defining the main method, inside the main method the two integer variable is defined.

    The "myNewAge" variable doesn't assign any value but in the "myCurrentAge" variable, it assigns an integer value that is "21". In the next line, we print the value of "myCurrentAge" variable.
Know the Answer?
Not Sure About the Answer?
Find an answer to your question ✅ “eclare an integer variable named myNewAge. Declare and initialize an integer variable named myCurrentAge. Initialize this variable with ...” in 📘 Computers and Technology if you're in doubt about the correctness of the answers or there's no answer, then try to use the smart search and find answers to the similar questions.
Search for Other Answers