Program to illustrates unhandled Exceptions


    #include<iostream.h>
    #include<conio.h>
    void main( )
    {
    float A[4]= { 22.22, 44.40, 12.13, 14.15 };
    float x = 12.12;
    cout<<" x = "<<x << endl;
    A[5555] = 18.77;                   //ERROR : index is out of bounds.
    cout<<" x = "<<x << endl;
    }
   

0 comments:

Post a Comment

 
 
 
 


Copyright © 2012 http://codeprecisely.blogspot.com. All rights reserved |Term of Use and Policies|