know yourselves. information, computer, 7 wonders, various.

Sunday, November 5, 2017

C++ programming language part-84 - Programming Logic and Technique:


Ex: 21_1  String Length

Programming Logic and Technique:
{ char string[10];
            char string[10]   
int i,;
            display "type the  string ";
            accept>> string ;
                        for(i=0;a[i]!='\0';i++);
            display " The length of your string is "<
           
Program Ex_21_1
            //palindrome (arraydemo.c)
            #include
            #include
            void main()
            {
            clrscr();   // To clean the screen
            int i;
            char a[10];//array of size 10 defined
            cout<<"type the  string "<<"\n";
            cin>>a;
            for(i=0;a[i]!='\0';i++);
            cout<<" The length of your string is "<

            }