Home » Sample Papers » Sample Paper Information Practice 12 » Sample Paper of Information Practice for class 12, CBSE. Paper No.2

Sample Paper of Information Practice for class 12, CBSE. Paper No.2

Sample Paper – 2014

Class – XII

Subject – Informatic Practices   


                                                                           (Section A)                                                                     


Q1. Answer the following Questions

  1. “Visual Basic is not an Object Oriented Language” Justify this statement.                                     2
  2. How is a standard module different from a form module? Explain with example.                                      2
  3. Why do we need Control structures ? mention the classification of Control structures With Syntaxes ? 2
  4. Write difference between Fix() and Int() functions.                         2
  5. Write characteristics of MDI Child Form. 2
  6. What do you mean by Arranging Child Windows. Write syntax and values for the same. 2
  7. Explain IIF() function with the help of an example. 2
  8. What is ADO data control? To whom you can connect this?                                                             2
  9. What do you understand by the term Record Source of an ADO data control?                                     2
  10. Distinguish between call by Val and call by Reference in visual basic.                                                          2
  11. Mention the limitations of Simple loop ? how to make simple loop as finite loop ?             2
  12. Explain the following terms:
  13. i) Startup Form ii) Load Statement   iii) Show Method       iv) Event                                  4
  14. Which controls function as a Data – Bound controls ? 4

 (Section B)                                                                     

Q 2.

a). Write a VB Procedure that takes “maxrows” and “maxcols” as argument to generate a output given below. using nested loop.                                                                                                                                                      3.

The output will be like this:

0  2    3   4    5

2  0    6   8   10

3  6    0   12 15

4  8   12  0   20

5  10 15  20  0


b). Write a sub procedure in VB which take two integers as argument and print it’s the reminder and quotient without using mod and division operator.                                                                                      2.


c). Write a procedure in VB to generate the series given below:                                                                          2

1, 3, 6, 10, 11, 13, 16, 20, …………………………….50


d).  A program accepts 5 strings in an array arrname(4). Further the program finds the longest string in the array and prints it. Write the VB program to achieve this.                                                 3



a). Convert the do while loop into for next loop without affecting its output.                                          2

i = -10

do while i <5

            If i mod 2 = 0 then

                        Num = num + i

            End if

            Print num

i = i – 3


b). Convert the do loop until into for next loop without affecting its output.                           2

Dim count, ans


    Count = 25


        Ans = ans + Count

        Count = count – 3

         Print Ans*Count;

    Loop Until count <= 8

    Print ans;

c). Find the output of the following code segment:                                                                                   2

       dim st as string, s as integer, t as integer

          st =MID (“Year of Luck 2009”,14,4)

          s =Val(MID(st,1,1))* Val(MID(st,4,1))

          t = Val(MID(st,1,1))+ Val(MID(st,4,1))     

           print s*t;

d). Re-write the following using If Else Structure:                                                                                     2

Private Sub Command1_Click( )

n = InputBox(“Enter The Month”, “Number”, 0)

m = InputBox(“Enter The year”, “Number”, 0)

If n = 1 Or n = 3 Or n = 5 Or n = 7 Or n = 8 Or n = 10 Or n = 12 Then

Print “31 days”

ElseIf n = 4 Or n = 6 Or n = 9 Or n = 11 Then

Print “30 days”

ElseIf n = 2 Then

                If m mod 4=0 then

Print “29 days”


Print “29 days”

                                End if


Print “Not a valid month no”

End If

End Sub

  1. Re-write the following using If Else Structure: 2

Private Sub Command2_Click( )

n = InputBox(“enter”, “Number”, 0)

Select Case n

Case 90 To 100

grade = “A”

Case 75 To 89

grade = “B”

Case 60 To 74

grade = “C”

Case 45 To 59

grade = “D”

Case 33 To 44

grade = “E”

Case 0 To 32

grade = “F”

Case Else

MsgBox “Out of Range”

End Select

Print grade

End Sub

Q 4. A School Data has two categories: Students and Staff. Design the VB Application to   perform the task given below. The interface for the application as given below:

Object Type Object Name Description
Form FrmDataEntry Main Form
Frame Fmrstudent Student frame
Fmrstaff Staff Framea
Text Box Txtstfaname To enter staff name
Txtstfsal To enter staff salary
Txtteadob To enter staff date of birth
Txtstuname To enter student name
Txtstufname To enter student father’s name
Txtstudob To enter student date of birth
Txtstuscno To enter student scholar number
Combo Box Cmbstfpost To select staff post
Cmbstuclass To select student class
Option Button Optteaching To select staff type
optStudent To Select  Frame type
Command Button Cmdsavestu To calculate fine
Cmdsave staff To clear the entered values



1. Write a VB procedure to check the first three character of scholar number should be SVM.          2.

2. When the user select optstaff then the objects of frame student should be disable and when the user select optstudent the objects of staff should be disable.                                                                   2.
3. In the combo box cmbstuclass and cmbstfpost the user is not allow to add the extra class or post apart from the list.                                                                                                                                           2
4. Write a VB Procedure to check weather the date of birth is valid or not be valid.                           2
5. Write a VB procedure to change the list of the combo box cmbstfpost according to the selection of option button

If optoffice is selected then list of combo box cmbstfpost should display Manager, Clerk, Accountant.

If optteaching is selected then list of combo box cmbstfpost should display PRT, TGT, PGT.              2



  1. Find the output of the below VB program        4.

Sub one(a As Integer, b As Integer)

Print a, b

a = a + b

b = a – b

a = a – b

b = a + b

If b < 10 Then

Call two(a, b)

End If

Print a, b

End Sub


Sub two(ByVal a As Integer, b As Integer)

Print a, b

a = a + b

b = a – b

a = a – b

b = a + b

End Sub


Private Sub Command1_Click()

Dim x As Integer, y As Integer

x = 3

y = 4

Call one(x, y)

Print x, y

End Sub


  1. Find the output of the below VB program 4.

Sub showe(a As Integer, c As String)

Print a, c

a = a + 1

End Sub


Private Sub Command1_Click()

Dim i As Integer

i = 1

Do While i < 9

If i < 3 Then

Call showe(i, “@”)

ElseIf i < 7 Then

Call showe(i, “#”)


Call showe(i, “*”)

End If


End Sub


  1. Find the output of the below VB program 2.


Private Sub Command 1_click()

Dim sum As Integer

Const a As Integer = 10

sum = 0

For i = 4 To 1 Step -1

sum = sum + i

Do Until sum > 50

sum = sum + a


Print sum


End Sub


The main objective of this website is to provide quality study material to all students (from 1st to 12th class of any board) irrespective of their background as our motto is “Education for Everyone”. It is also a very good platform for teachers who want to share their valuable knowledge.


  1. Aamir Parray says:

    Q. Change the following code using FOR LOOP without affecting the output :

    DIM count, ans
    ans = 1
    count = 20

    ans = ans* count
    count = count -2
    Loop Until Count < = 10

    • evirtualguru_ajaygour says:

      Hi Aamir Parray.

      Thanks for add this valuable information in this post, it will useful for other students.

      Thank you again, keep continue upload more information.


Leave a Reply

Your email address will not be published. Required fields are marked *