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

Sunday, November 12, 2017

C++ programming language part: 45 Data Storage Type


Data Storage Type

auto storage type

Data partaining of a function is lost when the function has been executed completely. Variable defined in a function are in memory and retain their value only as long as the function is in executed. When we declare like:  int p , by default, it is treated as auto int p we can also declare like: auto int p for clarity.

Program 35
            void nova();
            void main()
            {
             clrscr();
             int p;        // can be auto int p;
             for(p=0;p<4 o:p="" p="">
             nova();
            }
             void nova()
            {
             int x=1;      // auto storage type, can be auto int x=1
             cout<<"The executed time is "<
             x++;

            }





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

Saturday, November 11, 2017

C++ programming language part: 46 Sratic storage type


Sratic storage type

In auto storage type, function is lost when the function has been executed completely but in static storage type it ramains value even after the function to which it belongs has been executed. To ensure the difference between auto and static data type follow the following example:

Program 36
            void nova();
            void main()
            {
             int p;
             for(p=0;p<4 o:p="" p="">
             nova();
}
             void nova()
            {
             static int x=1;      // static storage type
             cout<<"The executed time is "<
             x++;

            }


Part- 86 assign the content of twostring



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