Page 22 - PROGRAMMING IN C_Neat
P. 22

 Example 2:
               c = ‘6’;                     Output:
               int  n = isalpha(c);         n = 0

        3. isupper():
           Used to check whether a given character is in upper case or not.
           General Form:

                        int  isupper(c);

           Example 1:
               c = ‘K’;                     Output:
               int  n = isupper(c);         n = 1 (non-zero)

           Example 2:
               c = ‘k’;                     Output:
               int  n = isupper(c);         n = 0

        4. islower():
           Used to check whether a given character is in lower case or not.
           General Form:

                        int  islower(c);


           Example 1:
               c = ‘k’;                     Output:
               int  n = islower(c);         n = 1 (non-zero)

           Example 2:
               c = ‘K’                      Output:
               int  n = islower(c);         n = 0

        5. ispunct():
           Used to check whether a given character is a punctuation character or not.
           General Form:

                        int  ispunct(c);

           Example 1:
               c = ‘.’;                     Output:
               int  n = ispunct(c);         n = 1 (non-zero)

           Example 2:
               c = ‘K’;                     Output:
               int  n = ispunct(c);         n = 0
        _______________________________________________________________________________________

        14. Explain storage classes. *

        Storage Classes:
         Storage class defines the scope and lifetime of a variable.
         Scope of Variable – how widely a variable is known among the functions in a program.
         Lifetime of Variable – how long a variable retains its value.
   17   18   19   20   21   22   23   24   25   26   27