Page 105 - Modular_V2.0_C++_Flikpbook
P. 105

C.   Fill in the blanks using the words given below:



                                                   log(), header, extension, isdigit( ), floor( )

                      1.  A ……………….....…… file can be defined as a collection of predefined functions.

                      2.  The ……………….....…… function returns the natural logarithm of the provided number.
                      3.  The ……………….....…… function returns the value after rounding it down to the nearest integer.
                      4.  The ……………….....…… function returns true if the provided character is a digit from 0 through 9.

                      5.  The .h is the ……………….....…… of a header file.

                 D.   Short answer type questions.
                      1.  What is the use of header files?
                      2.  Write the names of any three functions provided by math.h header file.

                      3.  How can we call a header file in a program?

                 E.   Long answer type questions.
                      1.  What is the difference between isalpha( ) and isalnum( ) functions?
                      2.  What is the difference between ceil( ) and floor( ) functions?




                                                       In the lab                             21 st  Century   #Critical Thinking
                                                                                                 Skills


                     Write a program to:
                                               2
                                                    2
                         Solve the expression: a  + b  - 2ab, where a = 10 and b = 2.
                         Calculate the value of the expression: cos x + sin y, if x = 60 degree and y  = 45 degree.
                         Find the square root of 2500.
                         Show the remainder after dividing the number 6.4 by the number 3.1.




                  Teacher's Corner

                 1.   Discuss the use of header files in C++ with the students.
                 2.   Explain the uses of different types of built-in functions to the students.




















                                                                                                                 103
                                                                                 Header Files and Library Functions
   100   101   102   103   104   105   106   107   108   109   110