RAWALPINDI BOARD 2014
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.
- How many are basic layouts of forms in Microsoft Access?
(a) 2
(b) 3
(c) 4
(d) 5
- A database containing all students in a class would store basic data of students in:
(a) Record
(b) Field
(c) Cell
(d) File
- 'Create command' is used to create:
(a) Table
(b) View
(c) Report
(d) Query
- A relation is analogous to a:
(a) File
(b) Field
(c) Record
(d) Row
- A relationship between countries and capitals is an example of relationship:
(a) One-to-one
(b) One-to-many
(c)Many-to-many
(d) Many-to-one
- In 2NF, which form of redundancy is removed:
(a) Functional
(b) Partial
(c) Associative
(d) Transitive
- What is the default field value of a text data type field?
(a) 2
(b) 5
(c) 20
(d) 50
C-Language
- The process of sending argument to a function is called:
(a) Sending
(b) Filtering
(c) Delivering
(d) Passing
- Which of the following functions is used to write character to a file:
(a) putc( )
(b) fputo( )
(c) fget()
(d) getc()
- Void occupies how many bytes in memory?
(a) Zero
(b) One
(c) Two
(d) Four
- The number of bytes used by int data type in C is:
(a) B
(b) 6
(c) 4
(d) 2
- Which format specifier is used for character data type?
(a) %S
(b) %C
(c) %d
(d) %f
- Which escape sequence is used to begin a new hue in C?
(a) /a
(b) /b
(c) /m
(d) /n
- Which programming structure makes a comparison?
(a) Relation
(b) Design
(c) Sequence
(d) Repetition
- Conditional operator takes operands:
(a) 1
(b) 2
(c) 3
(d) 4
- A loop within another loop is called:
(a) Finite loop
(b) Infinite loop
(c) Nested loop
(d) Outer loop
- Which of the following is called counter loop?
(a) Sending
(b) Filtering
(c) Delivering
(d)Passing
Visual Basic
- How widely a variable, recognized to procedures in the project, refers to its:
(a) Life time
(b) Duration
(c) Execution
(d) Scope
- How many elements are in the following array? Dim arr (10, 10) as integer?
(a) 121
(b) 2
(c) 10
(d) 100
- The process of carefully observing the working of an algorithm is called:
(a) Desk checking
(b) Compiling
(c) Debugging
(d) Coding
- Forms and controls are collectively recognized as:
(a) Properties
(b) Methods
(c) Events
(d) Objects
- Which form property will put text in the title bar of the form:
(a) Title
(b) Caption
(c) Border Text
(d) Header
- Methods characterize is an object's:
(a) Appesance
(b) Value
(c) Style
(d) Behaviour
- How many bytes are occupied by decimal data type in VB?
(a) 12
(b) 16
(c) 4
(d) 8
- Use to declare variable in VB:
(a) Sub
(b) Identifier
(c) Dim
(d) Event
- The loop which never ends is called:
(a) Continuous
(b) Controlled
(c) Infinite
(d) Counter
- If step keyword is not used in For-Next loop, default increment is:
(a) 1
(b) 0
(c) 10
(d) -1
Time: 3:10 Hours
(Subjective Part)
Marks: 83
Section-I
2. Attempt any EIGHT short questions.
- Define field.
- Write down two responsibilities of a database administrator,
- Define foreign key.
- Distinguish between data dependence and data independence.
- Define key.
- Who is data administrator?
- Define the term redundancy.
- List some advantages of IDE.
- Define any two database objects.
- Define the term cardinality of a relation,
- Describe the use of datasheet view in MS-Access.
- List different types of forms in MS-Access.
3. Attempt any EIGHT short questions. (8x2=16)
C-Language
- What are different types of errors in C program?
- What is main ( ) function used in C program?
- Who is a programmer?
- Define explicit casting.
- What is relational operator?
- What is arithmetic expression?
- Find output of the expression 10*(24/(5-2))+13
- Explain getche( ) function.
- What is the use of format specifier?
- Define standard input.
- What will be the output of the following?
int a = 9;
a = a °%4;
printf(" % d",a)
- What will be the output of the following?
float f= 3.24;
printf ("value = , %f,f);
3. Attempt any SIX short questions. (6x2=12)
- What is conditional operator? Also write syntax.
- Explain if statement.
- Trace the errors of following code,
# include (Stdio.h)
Main();
}
- Find output of following code
int Price = 10;
if (Price != 10)
Price = 0;
else
Price + = 2;
Printf("%",Price);
- What is binary stream?
- Write down the syntax of do-while-loop.
- What is the importance of function in C-language?
- What is function call?
- Trace the output for(a=5;a<=5;a=a+5)
OR VISUAL BASIC
4. Attempt any Eight short questions. (8x2=16)
- What is compiling?
- Define problem solving.
- What is object code?
- What is assignment operator?
- What does declaring a variable mean?
- What data type is used to handle YES or NO response?
- How are event procedures named?
- Describe OOP.
- What is the purpose of control naming conventions?
(a) Why visual basic is called event driven language?
- What is the output of 11*3^2 ?
- What do you know about code window in visual basic?
4. Attempt any Six short questions. (6x2=12)
- What is concatenation operator?
- Explain two conditional structures.
- What is output of 8Mod4?
- Explain timer control.
- Trace output of 5Mod2.
- Write syntax of Do-Loop-Until.
- What is the importance of procedure?
- How method is called in Visual Basic?
- List file modes for data files in Visual Basic.
SECTION-II
Attempt any One Question. (8x1=08)
MS-ACCESS
5. (a) What elements are combined to produce physical database design? Explain. 08
6. (a) Explain different data types available in MS-Access. 08
SECT1ON -III
Attempt Any ThreeQuestion. (8x2=16)
C-LANGUAGE OR VISUAL BASIC
C-LANGUAGE
7. (a) How many types of errors can occur in writing a C-program? Which one is the most difficult to locate and remove? Justify your answer, 08
OR VISUAL BASIC
7. (b) Define object. Explain the properties of form object in detail.
C-LANGUAGE
8. (a) Write down a program in which user enters a number and program tells that number is either positive, negative or zero. 08
OR VISUAL BASIC
8. (b) Write down a program in which user enters a number and program tells that number is either positive, negative or zero.
C-LANGUAGE
9. (a) What is for ( ) loop structure? Explain its working with an example. 08
OR VISUAL BASIC
9. (b) Explain the working of different Do loops in visual basic.
Section-IV
Attempt any three questions (5x3=15)
Question#10.
- Describe the procedure for finding and replacing data in MS-ACCESS. 05
- Write down the procedure to create a switch board in MS-ACCESS. 05
- Write down a program in C-language or Visual Basic that asks the user to enter the radius of circle and then display's the circle's area. Use the formula; area=P1 x radius x radius
- Where PI is the constant value of 3.14159. (05)
Note: Define a constant macro PI with # define directive in C-language.
- Write down a program that inputs table number and length of a table and then displays the table using FOR loop in C-language OR FOR-NEXT loop in Visual BASIC. (05)
- Write down a program in C-language or Visual Basic that inputs two numbers in main function, passes these numbers to a function. The function displays the maximum number. (05)