program to find Element at position in Array

#include<iostream.h>
#include<conio.h>
#include<string.h>
    void  main ( )
    {
        char s [ 15 ] ;
        int i , p ;
           cout<< "\nEnter any string : ";
           cin>>s;
        p = strlen ( s ) ;
          for ( i = 0; i < p ; i ++ )
                cout<< "\nElement at position "<<i+1<<" is"<< s[i] ;
          getch ( ) ;
    }

0 comments:

Post a Comment

 
 
 
 


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