FAISALABAD BOARD 2016
PAPER COMPUTER SCIENCE
PART-II
Time: 20 Minutes
(Objective Part)
Marks: 17
Note: You have four choke for each objective type question as A, B, C and D The choice which you think is correct; fill that circle in front of the question number. Use marker or pen to fill the circles. Cutting or filling two or more circles will result in zero mark in that question.
Question#1
(MS-ACCESS)
- In an E - R diagram, a rectangle represents a(n):
(a) Entity
(b) Attributes
(c) Relationship
(d) Tuple
- A relation that contains minimal redundancy and allows eas use is called:
(a) Clean
(b) Well - structured
(c) Simple
(d) Complex
- How many table views are available in Microsoft Access?
(a) 2
(b) 3
(c) 4
(d) 5
- Which auto form displays one record at a time?
(a) Tabular
(b) Data sheet
(c) Columnar
(d) Justified
- Data that causes inconsistency lacks:
(a) Good data
(b) Data integrity
(c) Data redundancy
(d) Data anomaly
- A request for information from a database in databas, terminology is called:
(a) Report
(b) Letter
(c) Table
(d) Query
- A row of relation is called:
(a) Attribute
(b) Entity
(c) Tuple
(d) Relation
C-Language OR Visual Basic
(C-Language)
- Relational operators allow you to numbers.
(a) Add
(b) Compare
(c) Multiply
(d) Divide
- If you want a user to enter exactly 20 values, which looi would be the best to use?
(a) While
(b) Do - While
(c) Infinite
(d) FOR
- What is the final value of x after executing the code for (int x)
(a) 8
(b) 9
(c) 10
(d) 11
- Multiple arguments to a function are separated by:
(a) Comma
(b) Semi colon(c) Colon
(d) Period
- Which mode opens only an existing file for both reading any writing?
(a) "r+"
(b) "w+"
(c) "a+"
(d) "w"
- The lowest level of programming language is:
(a) Assembly language
(b) Java
(c) Pascal
(d) C++
- Total number of key words in C is:
(a) 30
(b) 32
(c) 34
(d) 36
- Which of the following function is used to output data in programs?
(a) Printf
(b) Getch
(c) Getche
(d) Scanf
- An ampersand before the name of a variable denotes:
(a) Actual value
(b) Variable name
(c) Address
(d) Data type
- Which programming structure executes program statement in order?
(a) Sequenc
(b) Repetition
(c) Decision
(d) Relation
(Visual Basic)
- You can enter data in control only when it has:
(a) Tab order
(b) Focus
(c) Mask
(d) Control
- The expression (10 mod 3) has a value equal to:
(a) 0
(b) 3
(c) 10
(d) 1
- A project file is saved with the extension:
(a) .frm
(b) .vbp
(c) .vb
(d) .frx
- What is default lower bound of an array?
(a) 0
(b) 1
(c) 2
(d) 3
- Which returns TRUE if A = 25 and B = 35?
(a) A + B
(b) A < > B
(c) A > = B
(d) A = B
- Which is NOT a Visual Basic control?
(a) Variable
(b) Text box
(c) Forms
(d) Command button
- The windows that do not require any user action before the focus can move to another form:
(a) Model
(b) Modeless
(c) Modulus
(d) Module
- The prefix for naming a menu item is:
(a) MMU
(b) mme
(c) men
(d) MMD
- When no item is currently selected in a list box, the list inde property is:
(a) -3
(b) -2
(c) -1
(d) 0
- An example of windows common dialogue box is:
(a) Open
(b) Do
(c) For
(d) While
Time: 2.40
Subjective
Section -I
(MS - Access)
2. Attempt any EIGHT short questions. (8 x 2 =16)
- Define program file.
- Differentiate between candidate key and primary key.
- Write the purpose of index file.
- Who is a database administrator?
- Define field.
- Define attribute. Give example.
- Define relationship.
- Define the term redundancy.
- What is data base wizard?
- Write two advantages of form.
- Define the term sorting.
- Write the purpose of radio button.
(C-Language)
3. Attempt any EIGHT short questions. (8 x 2 = 16)
- Define high level language.
- List any four commonly used high level languages.
- What are header files?
- Define variable.
- What is the use of AND logical operator?
- List out the names of functions used for character input?
- Predict the output of the following code:
int number = 2;
number ++ ;
printf("%d", number);
- Trace out the errors in the following code:
int a,
prin ("%d", a);
- Find the error in the following code:
main ( );
{
printf ("Hellow);
}
- Trace the output of the following code:
void main ( )
{
printf ("22 t") ;
printf ("666") ;
}
- Trace the output:
{
printf(" *\n**\n***\n");
}
- Write down the use of format specifiers in C - language.
OR (Visual Basic)
3. Attempt any Eight (8) short questions. (8 x 2 = 16)
- Define high level language.
- List any four commonly used high level languages.
- Why VB is called event driven language?
- write any two advantages or computer program in vb.
- Differentiate between design time and runtime.
- Define code window.
- Write down two events of VB for a form focus.
- What is the purpose of control naming conventions?
- Trace the output:
Num = 10 - 3 * 2 + 4/2
- Define the use of option explicit statement in VB.
- List out two rules for naming variable in VB.
- Why is it important to assign a data type to a variable in VB?
OR (C-Language)
4. Attempt any SIX short questions. (6 x 2 = 12)
- What is control structure?
- What is compound statement?
- Trace the error in the following code:
void main ( )
{
int x = 0
if (x = 1)
printf ("Hello");
else
printf ("Bye");
}
- Predict the output for the following code:
int a, b, c ;
a= 10;
b = 3;
if (a% b = = 1)
c = 0 ;
else
c = 1 ;
printf ("%d" c) ;
- Write the syntax of while loop, both for single statement and for multiple statement.
- Predict the output from the following code:
int n ;
clrscr ( ) ;
for (n = 5 ; b > = 1 ; n - -)
printf ("% din", n);
getch ( ) ;
- Define function. Why is it used in a program?
- What is function definition?
- What do you mean by text stream?
OR (Visual Basic)
5. Attempt any SIX short questions. (6 x 2 = 12)
- What is control statement or decision statement?
- Write down the syntax of IF ---- THEN ---- ELSE structure.
- Trace the error from the following code:
Dim x as integer
x = 3
if x > = 33
print "PASS"
else
print "FAIL"
endif
- Predict the output from the following code:
- Dim Price as integer
Price = 200
if price > = 200
MsgBox "Take it"
else
MsgBox "No Thanks"
Endif
- Describe looping structure.
- Write syntax of For - Next loop. Also draw its flow chart.
- Predict the output of the following code:
Dim i, sum as integer
i = 1
sum = 0
while i < = 5
print i
sum = sum + 1
i = i + 1
wend
print "Sum =" & sum
- How does an array differ from simple variable?
- Describe the project file in VB.
SECTION -11
6. Attempt any One Question. (8 x1=8)
MS-ACCESS
- Define database model. Describe different types of database models. 8
- What is referential integrity? Give example. Explain cascade update and cascade delete options in referential integrity. 8
SECT1ON –III
7. Attempt any TWO Question. (8x2=16)
C-LANGUAGE OR VISUAL BASIC
C-LANGUAGE
- What is language processor? Describe different types of language processor. 8
- Write a program in C that inputs the number of the month of the year and display the number of days of the corresponding month using if - else - if statement. (e.g. if user enters 2, it will display 28 or 29). 8
- Define for loop. Give its syntax and flow chart. Explain its working with the help of an example. 8
OR VISUAL BASIC
- What is language processor? Describe different types of language processor. 8
- Write a Visual Basic program that inputs the number of the month of the year and display the number of days of the correspondingmonth using if - then - else - if statement. (e.g. if user enters 2, it will display 28 or 29 8
- Define FOR .... NEXT loop. Give its syntax and flow chart.
- Explain its working with the help of an example.
SECTION-IV
8. Attempt any THREE; -questions. (5x3=15)
- Write a procedure for creating a relationship in MS - Access.5
- Write a procedure for creating a form in design view. 5
- Write a program that inputs temperature in Fahrenheit & calculate
- temperature in Celsius (C = 5/9 * (f - 32)). 5
- Write a program that shows counting from (10 to 1) using while loop. 5
- Write a program that display "Pakistan" ten times using functions. 5