Using a properly initialized constant variable. - C++ Data Type

C++ examples for Data Type:const

Description

Using a properly initialized constant variable.

Demo Code

#include <iostream> 
using namespace std; 

int main() //  w ww.j  av a2s. c o  m
{ 
    const int x = 7; // initialized constant variable 

    cout << "The value of constant variable x is: " << x << endl; 
}

Result


Related Tutorials