CBSE Guess > Papers > Important Questions > Class XII > 2009 > Informatics Practices > Informatics Practices By Mr. Ravi Goyal
CBSE CLASS XII
Q. 1. Answer the following Question (2 marks each)
- What are Datatypes? How many datatypes are supported in Visual basic name them.
- What are Merits and Demerits of Variant datatypes ?
- How can you enforce explicit declaration of variable?
Which three programming constructs are supported by every programming language? Describe them?
- What do you understand by entry and exit tested loops? Give example?
- Which keywords alter the lifetime of a variable? Explain?
- Explain how arguments can be passed to the procedures?
- What are different types of Modules? Name them with description?
- What are the advantage of using sub procedure and how they differ from function?
- Explain the difference between : -
- Int() and Fix()
- Mid function and Mid statement?
Section - B
Q. 2. read the following case study and answer the questions that follow :
ABC company has developed the following interface to enter the display data related to Income tax of employees.
- When the form loads text boxes for income tax, Education tax , surcharge and total tax amount should be disabled. They should be enabled only when calculate command button is clicked. (2)
- Taxable income entered should be numeric data. (2)
- When the user clicks the clear command button textboxes empcode and empname should be set of blank and textboxes be set to zero and cursor move to empcode. (2)
- When calculate command button is clicked income tax, educational tax, surcharge and total tax (sum of income tax, education tax , surcharge) is displayed in their respective text boxes based on the following criterion :- (4)
Taxable income |
Income tax |
Education tax |
Surcharge |
Upto Rs. 100000 |
Nil |
Nil |
Nil |
Rs. 100001 to 150000 |
10% of amount exceeding Rs. 100000 |
2% of taxable income |
Nil |
Rs. 150001 to 250000 |
Rs. 5000 + 20% of amount exceeding Rs. 150000 |
2% of taxable income |
Nil |
Rs 250001 and above |
Rs. 25000 + 20% of amount exceeding Rs. 250000 |
2% of taxable income |
1% of taxable income |
Q. 2. (i) Find the output of the following programe :-
a. x = “class” (2)
Print (5 * 4 > 8 + 3) And (3^2 < 6/2)
Print Val(“16 oranges”) + Len(x)
Print Instr(“computers”, “ut”)
Mid(x , 2,1) = “he”
Print x
b. Dim ast as string (1)
Dim I as integer
ast = “Mausam”
Tot = Len (ast)
For K = 1 to Len(ast)
Print Mid(ast , K , Tot)
Next
c. ctr = 15 (1)
ncount = 0
Do
ncount = ncount + 1
ctr = ctr + 2
Loop until ctr < 0
Msgbox ncount
(ii).
(a). Change the following code using For….Next loop without. (2)
affecting the output :
Dim cou, an
an = 1
cou = 20
do
an = an * cou
cou = cou – 2
Loop Until
Print an
(b). Change the following code using Do….Loop while. (2)
Dim ar
co = 1
Do until co > 5
ar = co * co
If co = 2 then
Print ar
End if
co = co + 1
loop
(iii) (a). Find the error and rewrite the code : (1½)
x = 50
Select x
Case is x = 5
Print “five”
Case < 5
Print “ Less than 5”
Case is 50
Print “OK”
End Case
Print Rtrim(x)
(b). x = 5 (1½)
Do while x <= 10
if x Mod 2 = 0
print x
Loop
k = k + 1
End if
(iv) (a). Create a function that returns the integer part of a fractional number. This function should be available throughout your project. (3)
( b). Write a function Power to raise a number m to power n. The function takes two integer value and returns the result correctly, Use default value of 2 for n (to calculate squares) if argument is omitted. (3)
(c). Write a Procedure to take a character and a Integer parameter and repeat character as many times as integer ( Do Not use String function ) (example replicate(6,”A”) mean output is “AAAAAA”). (3)
Paper By Mr. Ravi Goyal
|