Page 90 - Modular_V1.1_Flipbook
P. 90

char ch;
                        clrscr();

                        cout<<”Enter a character: “;
                        cin>>ch;
                        if(isupper(ch))
                        cout<<”Character in lowercase: “<<(char)tolower(ch);
                        getch();

                  }
                      Recap



                          A header file can be defined as a collection of predefined functions which you can use to
                         increase your program productivity and save your programming time.
                          The ctype.h header file contains the definitions of character handling functions.

                          The math.h header file provides several mathematical and trigonometric functions that you
                         can use to perform various mathematical operations.


                          The  stdlib.h  header  file  provides  several  general  purpose  functions  for  dynamic  memory
                         management, random number generation, integer arithmetic, etc.



                                                         Exercise



                  A.   Tick (3) the correct option.
                       1.  Which of the following functions is used to convert the entered character into uppercase?

                           a.  toupper( )                                   c.  tolower( )
                           b.  isaplha( )                                  d.  isdigit( )
                       2.  Which of the following header files provides functions to handle characters?

                           a.  ctype.h                                      c.  iostream.h
                           b.  stdlib.h                                    d.  math.h
                       3.   Which  of  the  following  functions  returns  the  floating-point  remainder  after  dividing  two
                           fractional numbers?
                           a.  fmod( )                                      c.  pow( )

                           b.  sqrt( )                                     d.  fabs( )
                       4.  The ……………………. function returns the sine value of the given angle.
                           a.  sin( )                                       c.  sinc( )

                           b.  cos( )                                      d.  csin( )
                       5.  Which of the following functions is used to terminate the calling process?
                           a.  exit( )                                      c.  abort( )
                           b.  abs( )                                      d.  div( )





                  88      Touchpad MODULAR (Version 1.1)-X
   85   86   87   88   89   90   91   92   93   94   95