Ask Question
31 October, 14:06

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

+2
Answers (1)
  1. 31 October, 17:03
    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?
Get 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 & Technology if there is no answer or all answers are wrong, use a search bar and try to find the answer among similar questions.
Search for Other Answers