Page 7 - Modular_V1.1_Flipbook
P. 7

Assessment Resources








                                        Exercise: This section has objective and subjective questions.
                                                Exercise                        3.   void main()   4.   void main()
                                                                               {          {
                                          A.   Tick (3) the correct option.         int mrk1, mrk2, mrk3;          int x = 4, y = 3, z = 6;
                                                                                    int total;          x = ++z + ++y / z;
                                             1.  Which of the following is a block of code to perform a particular task?
                                                                                    char grade;          cout<<”value of x is: “<<x;
                                             a.  Function      c.  Operator
                                                                                    mrk1 = 80;      }
                                             b.  Header file       d.  None of these
                                                                                    mrk2 = 90;
                                             2.  Predefined functions are called ……………………. functions.         mrk3 = 78;
                                             a.  Built-in      c.  User-defined           total = mrk1 + mrk2 + mrk3;
                                             b.  Both a and b       d.  None of these
                                                                                    grade = (total >= 200)? ‘A’ :’B’;
                                             3.  Which of the following is like a placeholder?         cout << “Grade is: “ << grade;
                                             a.  Variable      c.  Function    }
                                             b.  Parameter       d.  Block                Critical Thinking
                                             4.  ……………………. a function means giving a body of the function.  In the lab
                                             a.  Defining      c.  Prototyping     Write a program to convert the given number of days into months and days.
                                             b.  Declaring       d.  Calling      (Consider 30 days = 1 month)
                                             5.  Which of the following is called an actual argument?    Type the following program and see the output:
                                             a.  Parameters passed at the time of calling a function        #include<iostream.h>
                                                                               #include<conio.h>
                                             b.  Parameters passed at the time of declaring a function
                                                                                 void main()
                                             c.  Both a and b
                                                                                 {
                                             d.  None of these                   int a, b;
                                                                                 a = 20;
                                             6.  There are two methods to call a function: call by value and ……………………. .
                                                                                 b =-10;
                                             a.  Call by reference      c.  Call by argument      clrscr();
                                             b.  Call by parameter       d.  All of these
                                                                                 a = ++a;
                                                                                 cout <<”The new value of a is: “ << a << “\n “;
                                          B.   Write ‘T’ for true and ‘F’ for false.
                                                                                 b = ++b;
                                             1.  A function allows you to reuse the code many times.   ……………………     cout <<”The new value of b is: “ << b << “\n “;
                                             2.  The functions written in the header files are called library functions.   ……………………     a = a * --b;
                                             3.  Call by value is a technique of passing the values of variables instead of         cout <<”The new value of a is: “ << a << “\n “;
                                                                               a = a + 154;
                                           actual variables to a function while calling it.   ……………………
                                                                                 cout <<”The new value of a is: “ << a << “\n “;
                                             4.  Local variables can be accessed outside the function in which they are declared.  ……………………
                                                                                 b = a++ * b;
                                             5.  Global variables can be declared inside a function.    ……………………     cout <<”The new value of b is: “ << b << “\n “;
                                                                                 getch();
                                          C.   Fill in the blanks using the words given below.
                                                                                 }
                                                                                Write a C++ program to calculate the perimeter of a triangle with the same sides.
                                              reference, scope resolution, definition, functions, arguments
                                             1.  The (::) is known as …………………… operator.   Teacher's Corner
                                             2.  In call by …………………… technique, reference or memory address of variables are passed to a
                                                                             1.   Explain the use of different types of operators provided by C++ to the students.
                                           function.                         2.   Discuss the requirement of typecasting with the students.
                                                      Functions in C++  81   32  Touchpad MODULAR (Version 1.1)-X
                                   Test Sheet: This section                    In The Lab: This is a
                                   has questions to assess                     lab activity to develop
                                          students.                               practical skills.
                                                Test Sheet-1
                                                (Based on chapters 1 to 5)                    Life Skills & Values
                                            Section A                                 In the lab
                                                                                    Type HTML code to show the working of Internal and Inline Style Sheet.
                                     A.   Tick (3) the correct option.
                                        1.  A program is a set of............................ .       Type HTML code to show the linking of External Style Sheet to a web page.
                                                                                  Type HTML Code that uses Inline Style Sheets to display the following content in a web page.
                                        a.  Statements      c.  Characters
                                        b.  Symbols      d.  Numbers
                                        2.  ............................ are reserved words which cannot be used as variable names.
                                        a.  Variables      c.  Constants
                                        b.  Operators       d.  Keywords
                                        3.  Which of the following is not a category of operators in C++?  Quote of the Day
                                                                                    to change the world.
                                        a.  Arithmetic      c.  Relational          Education is the most powerful weapon which you can use
                                        b.  Logical       d.  Scientific
                                        4.  Which of the following symbols is used to represent extraction operator?
                                        a.  &&      c.  <<
                                                                                    Type HTML code (Use CSS concept) to display web page as shown below:
                                        b.  //      d.  >>
                                        5.  Who was the developer of C++ language?
                                        a.  Bjarne Stroustrup       c.  Guido Van Rossum
                                        b.  Mitchel Resnick      d.  None of these
                                        6.  Which of the following is a symbol used in naming a variable?
                                        a.  Underscore ( _ )       c.   Asterisk ( * )   Education  is  the  most  powerful
                                        b.  Plus ( + )      d.  None of these         weapon  which  you  can  use  to
                                                                                       change  the  world.
                                        7.  Which of the following is a combination of variables or values with operators?
                                        a.  Relation      c.  Condition
                                        b.  Operator       d.  Expression
                                        8.  What will be the output of the following code?      Specification:
                                       if(True)
                                                                                    Top Margin=100px   Left Margin=150px   Height=170px
                                       cout<<“Hello”;
                                                                                    Width=320px   Background Colour=Pink   Border Width=10px
                                       else
                                                                                    Border Type=SOLID   Border Colour=BLACK   Outline Width=20px
                                       cout<<“Hi”;                                  Outline Type=Ridge   Outline Colour=Red   Font Style=Italic
                                        a.  Hello       c.  Hello Hi                Font Size=40px   Font-family=Verdana   Text Alignment=Center
                                        b.  Hi       d.  Nothing will print
                                        9.  How many words can you take as string by using the cin object?
                                        a.  1      c.  2
                                        b.  3      d.  5                         1.  Explain the uses of Cascading Style Sheets.
                                                                                 2.  Describe CSS Font, CSS Float and CSS Margins to the students.
                                                  Test Sheet-1  51
                                                                                            Cascading Style Sheets  95
                             Periodic Assessment: Four                            Project Work: This is an
                              Periodic Assessments are                            assessment to challenge
                               included to evaluate the                           the students to apply the
                             knowledge of the students.                               concepts learnt.
                                     Periodic Assessment-2
                                       (Based on chapters 3 to 5)                          PROJECT WORK
                                  A.   Write the use of following operators with an example:
                                     1.  != operator
                                   ...............................................................................................................................................................................................
                                   ...............................................................................................................................................................................................  Project 1  Inter-Disciplinary
                                     2.  && operator                                 Write a C++ program to convert the temperature given in Degree Celsius to Fahrenheit.
                                   ...............................................................................................................................................................................................
                                   ...............................................................................................................................................................................................  Project 2
                                                                                     Write a C++ program to take a number as input from the user and print a square of same
                                     3.  %= operator
                                                                                     number of stars as shown:
                                   ...............................................................................................................................................................................................  *    *    *    *    *    *
                                   ...............................................................................................................................................................................................  *                          *
                                     4.  ++ operator                                       *                          *
                                                                                           *                          *
                                   ...............................................................................................................................................................................................
                                                                                           *                          *
                                   ...............................................................................................................................................................................................  *                          *
                                                                                           *    *    *    *    *    *
                                  B.   Write the output of the following program:                Experiential Learning
                                   #include <iostream.h>                             Project 3
                                   void main() {                                     Write a C++ program to take the age and basic salary of an employee as input from the user and
                                     int time = 20;                                  calculate the gross salary on the basis of the following criteria:
                                     if (time < 18) {                                     If the age of an employee is greater than 18 and less than 45 years, then the HRA will be
                                         cout << “Good day.”;                         5% and DA will be 10%.
                                                                                          If the age of an employee is greater than 45 years and less than 55 years, then the HRA
                                     } else {
                                         cout << “Good evening.”;                     will be 7% and DA will be 12%.
                                     }                                                    If the user enters age greater than 55 years, then the message “Invalid Details” will be
                                   }                                                  printed.
                                                                                     The final out will be as shown:
                                  C.   Write a C++ program to solve the following expression:
                                   A + 3 * (B - 4) - 10/2
                                   Where, A = 25 and B = 10.
                                                                                     Hint:
                                                                                        if(age > 18 && age < 45)
                                                                                        {
                                                                                       HRA = bsalary * 5/100;
                                                                                       DA = bsalary * 10/100;
                                                                                       GrossSalary = bsalary + DA + HRA;
                                                                                        }
                                  50  Touchpad MODULAR (Version 1.1)-X
                                                                                                 Project work  103
   2   3   4   5   6   7   8   9   10   11   12