C++ Automatic Storage Duration Question

Introduction

Write a program that defines two variables of type int with automatic storage duration inside the main function scope.

You can use the following code structure.

#include <iostream> 

int main() 
{ 
    //your code here
} 



#include <iostream> 

int main() 
{ 
    int x = 123; 
    int y = 456; 
     std::cout << "The values with automatic storage durations are: " << x  
     << " and " << y; 
} 



PreviousNext

Related