Ask Question

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. 23 December, 23:06
    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 & 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