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

Sunday, November 12, 2017

C++ programming language part: 38 String


String 

A string is a sequence of contiguous characters in memory terminated by null character '\0'. The C header file provides a wealth of special function for manipulating strings.





Once again tracing Pointer

The following program defines a float x and two pointers p and q. It prints their values and their address. it also prints the values of the objects that the pointer point to:

Program 29_8
{           float x=44.44;
            cout<< "x= "<
            cout<< "\t &x= "<<&x<
            float *p=&x;                                          // p points to x
            cout<<" p=  "<
            cout<<"\t &p=  "<<&p;                           // Prints address of p
            cout<<"\t *p=  "<<*p<
            *p=77.77;
            cout<<" p=  "<
            cout<<"\t &p=  "<<&p;
            cout<<"\t *p=  "<<*p<
            cout<<"x=  "<
            cout<<"\t &x=  "<<&x<
            float *q=&x;                                          // q points to x
            cout<<" q=  "<
            cout<<"\t &q=  "<<&q;
            cout<<"\t *q=  "<<*q<
            cout<<"x=  "<

            cout<<"\t &x=  "<<&x<


Part- 86 assign the content of twostring



জ্ঞানকোষ প্রকাশনী
৩৮/২-ক, বাংলাবাজার (২য় তলা), ঢাকা।
       ফোনঃ ৭১১৮৪৪৩, ৮১১২৪৪১, ৮৬২৩২৫১.         
                                                     
কলকাতায় পরিবেশক/প্রাপ্তিস্থান
রিতা ইন্টারন্যাশনাল
৩৬, পি.এন. ব্যানার্জি রোড, কলকাতা
ফোনঃ ২৫১৩৮৩৫৯, ৯৮৩০৪৩৯৬৭৯, +৯১৯৮৩০৪৩৯৬৭৯