Sunday, 11 November 2012

Program illustrating Static Cast in C++

//This Program illustrates how static_cast keyword is used in C++
#include<iostream>
#include<typeinfo>
using namespace std;

int main()
{

    int i;
    const int x=100;
    i=static_cast<int>(x);
    cout<<"\ni is: "<<i;

    return 0;
 }


Click here to download the C++ Program

No comments:

Post a Comment