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

Sunday, November 12, 2017

C++ programming language part: 35 Boolean Functions


Boolean Functions

In some situation it is helpful to use a function to evaluate a condition, typically within an if statement or a while statement. Such functions are called Boolean functions. Each of the following functions is predefined in the header file.

Program 29_6_1
 //Boolean  function (functiondemo)
             void catagory_of_character(char c)
             {
              cout<<"The Cheracter ["<
              if      (isdigit(c)) cout<< "digit."<
              else if (islower(c)) cout<< "lower-case letter."<
              else if (isupper(c)) cout<< "upper-case letter."<
              else if (isspace(c)) cout<< "white space character."<
              else if (iscntrl(c)) cout<< "control character."<
              else if (ispunct(c)) cout<< "punctuation mark."<
              else                 cout<< "Error."<
              }
             void main()
             {
              for(int c=0;c<56 c="" o:p="">
              catagory_of_character(c);

             }

Part- 86 assign the content of twostring



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