SAHIWAL BOARD 2016
PAPER COMPUTER SCIENCE
PART-II
Time: 20 Minutes
(Objective Part)
Marks: 17
Note: You have four choice for each objective type question as A, B, C and D. The choice which you think is correct; fill that circle in front of that 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.
(MS-ACCESS)
- Which one of the following type of file requires largest processing time?
(a) Sequential file
(b) Random file
(c) Indexed Sequential file
(d) Direct Access file
(a) Sort Query List
(b) Self Quantifying language
(c) Structure Query language
(d) Self Quantative language
(a) Composite Key
(b) Secondary Key
(c) Sort Key
(d) Primary Key
- Which one of the following is used to associate entities with each other?
(a) Attribute
(b) Relationship
(c) Entities
(d) Cardinals
- The goal of normalization is to:
(a) Increase Redundancy
(b) Increase inconsistency
(c) Get Stable Data Structure
(d) Increasing Anomalies
- What symbol indicates that you are editing a record?
(a) Pencil
(b) Black arrow
(c) Key
(d) Asterisk
- How many form layouts are provided by MS-Access?
(a) 2
(b) 4
(c) 6
(d) 8
C-Language OR Visual Basic
(C-Language)
- .exe file is produced by the:
(a) Linker
(b) Loader
(c) Compiler
(d) Interpreter
- Relational operators are used to:
(a) Establish a relationship among variables
(b) Perform arithmetic operations
(c) Compare two values
(d) Create relationship
- The formed specifier %u is used for:
(a) Integer
(b) Unsigned short
(c) Unsigned float
(d) Unsigned long int
- The symbol " = " represents:
(a) Comparison operator
(b) Assignment operator
(c) Equal to operator
(d) Logical operator
- In if statement, false is represented by:
(a) 0
(b) 1
(c) 2
(d) 3
- When a relational expression is false, it has the value:
(a) Zero
(b) One
(c) Less than 0
(d) Two
- Which of the following loop is available in C-language?
(a) While-wend
(b) For-next
(c) Sequence
(d) Do-while
- Which loop Structure always executes at least once?
(a) Do-while
(b) For
(c) While
(d) Sequence
(a) Built in function
(b) User defined function
(c) Local function
(d) Keyword
- Which of the following function is used to write a string to a file?
(a) Puts ( )
(b) Putc ( )
(c) Fputs ( )
(d) Fgets ( )
(Visual Basic)
- Which of the following contains the programming code and GUI?
(a) Program file
(b) Module file
(c) Project
(d) Report file
- The "name" of a student represents the:
(a) Byte types data
(b) Currency type data
(c) String type data
(d) Word type data
- To display a message following function is used:
(a) Input Box
(b) Message
(c) MSG Box
(d) Tool Box
- The Masg Box may contain:
(a) Write Button
(b) OK
(c) Left Button
(d) Tool Button
- Which of the following operator is not a comparison operator?
(a) = =
(b) < =
(c) > =
(d) =
- Which of the operator returns false if both have equal values?
(a) >
(b) +
(c) XOR
(d) ||
- Which of the following loop structure is executed at least once?
(a) For-Next
(b) While-wend
(c) Do-While-loop
(d) Do-Loop-while
- For Next loop always executs first then checks the condition:
(a) True
(b) Cannot determine
(c) Determine
(d) False
- The steatement "End Sub" indicate the end of:
(a) Procedure
(b) Function
(c) Variable
(d) String
- The specific area in memory where data file is opened:
(a) RAD
(b) Page
(c) Buffer
(d) RAM Block
Time: 3:10 hours
(Subjective PartII)
Marks: 83:
Section I
(MS-ACCESS)
2. Attempt any EIGHT short questions. (8 x 2 = 16)
- Differentiate between Data and Information.
- Define Primary Key.
- List two properties of a relation.
- Define End user.
- Define Entity or Object.
- List two data distribution strategy.
- How is database integrity maintained?
- Define Synonym.
- Write down two database objects in MS-Access.
- Name any four parts of MS-Access application window.
- List out two types of relationship.
- Differentiate between Combo box and List box.
(C-Language)
3. Attempt any EIGHT short questions. (8 x 2 =16)
- Define source code.
- Define program.
- Define High Level Language.
- Describe the identifier.
- Define variable.
- Trace the error in the following Code:
int x = 10 y= 15;
x = x ++
y = + + y;
printf ("% d % d", x,y);
- Predict the output of the following code;
int number = 6;
+ + number ;
printf ("%d \ n ", number);
- What is the use of "scanf ( ) " function? Write its syntax.
- Describe the "getche ( )" function.
- Predict the output of the following:
floatf = 3.14159
printf = ("f = % 4.2 f", 0;
- Predict the output of the following
int a = 9;
a = a % 4 ;
printf (" \ n % d is Result " ,a );
- Trace out errors in the following code:
float area , r,
clrscr ( );
print f ("Enter radius);
scan f ("% f ", r);
OR
(Visual Basic)
3. Attempt any Eight (8) short questions. (8 x 2 = 16)
- What is visual basic?
- Describe the properties window.
- Define the purpose of name property of a control.
- Define object and method in V.B.
- What is the use of Key Press and Key Down events?
- Trace the error from the following Code:
If Make > 40
Msg box "Hello"
End / f
- Predict the output of the following code:
Dim a As Integer
For a = 0 to 5
Print a
Next a
End Sub
- Describe the variable in V.B.
- List any two rules for declaring variable in V.B.
- Trace the error of the following code:
Dim n As integer
n = 1
while n < = 10;
Print n
n = n + I
Wend
- Predict the output of the following code:
Dim A, B As Integer
A = 5
B = 2
Print A * B
Print A Mod B
- Predict the output of the following code:
Dint X, Y, Z as Integer
Y = 10
Z = 3
X = Y * z + 3
Print x
OR
(C-Language)
4. Attempt any SIX short questions.
- Define control structure.
- What do you know about "if' statement?
- Find output:
int ( p > q ) fJ (p = 4)
p=p+ 1;
else
P = P + 1;
p=p - 1;
p = p * 2;
- Trace out errors in the following Code:
Void main ( )
int R;
r = 17;
if (R > 0)
{
R = R * 3.14 * 3.14;
15
print f ("the value of R is = % f "; R);
getch ( );
}
- Write the output of following Code:
int x;
for (x = 0; x > = 0 ; x ++)
printf (" % d \ n" , x);
- Convert following loop Code into for loop Code:
i= 3,
do
{
print f ("% d \ n ", i);
i + = 3;
}
While (i < = 21);
- What is meant by function definition?
- How long the global variable exists in the memory?
- Define a Stream.
OR
(Visual Basic)
4. Attempt any SIX short questions. (6 x 2 = 12)
- What is an identifier? What are the legal. Characters for an identifier in V.B.
- Can every case block by written as a Select-Case block?
- Differentiate between Do while and Do until loop in V.B.
- What step value is used if it is not specified in For Next loop?
- Make a comparison between counter and conditional loops in V.B.
- Define default property of a control.
- Which function loads a picture at runtime?
- Differentiate between modules and procedures.
- What is the default parameter passing method in V.B?
SECTION -II
Attempt any One Question. (8 x 1= 08)
MS-ACCESS
5. Define database system. Explain any three components of database system. 8
6. Explain 8 different data types available in MS-Acess. 8
SECTION -III
Attempt any Two Question. (8x2=16)
C-LANGUAGE OR VISUAL BASIC
C-LANGUAGE
7. Briefly describe the basic structure of C program with example. 8
OR VISUAL BASIC
Briefly describe the program development process in Visual Basic. 8
C-LANGUAGE
8. Write a program that inputs a character and detemines whether it is a vowel or consonant. 8
OR
VISUAL BASIC
Write a program that inputs a character and determine whether it is a vowel or consonnat? 8
C-LANGUAGE
9. What is nested loop? Give its syntax. Explain its working with an example. 8
OR
VISUAL BASIC
What is nested loop? Give its syntax Explain its working with an example. 8
SECTION-IV
10. Attempt any THREE questions. (5x3=15)
- Write a procedure of applying primary key in a table. 5
- Write a procedure to create a form using design view. 5
- Write a program in C-Language or Visual Basic thta inputs radius of sphere from the user.Calculate area (Hint: area = 4,cr2 ) 5
- Write a program in C-Language or Visual Basic that display back counting from 100 to 1. 5
- Write a program in C-Language or Visual Basic that display a message "Wellcome" on the screen using function. 5