SAHIWAL BOARD 204
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 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.
(a) Primary key
(b) Secondary key
(c) Composite key
(d) Sort key
(a) Data definition
(b) Data manipulation
(c) Data definition and manipulation
(d) Searching records
- The wild card__________sal lei) ma.
(a) Saleema
(b) Salima
(c) Wilma
(d) Sahmaa
- Which of the following is not included in the definition of Entity.
(a) Person
(b) Object
(c) Concept
(d) Action
- In relational database, a table is also called a:
(a) Topic
(b) Relation
(c) File
(d)Schema
(a) Structured query, language
(b) Sort query language
(c) Self query language
(d) Seek query language
- How many are the layout of report?
(a) 2
(b) 3
(c) 4
(d) 5
C-LANGUAGE
- Which is an example of multiple branches from single expression.
(a) If statement
(b) Switch statement
(c) While loop
(d) For loop
- Which of the following is equivalent to (P>=q)?
(a) P<q
(b) !(p<q)
(c) p>q
(d) !(p>q)
- The escape sequence for backslash is:
(a) \
(b) \ b
(c) \n
(d) \ t
- Which escape sequence can be used to begin a new line in C?
(a) \a
(b) \b
(c) \n
(d) \ m
- Which of the following is a valid character constant?
(a) a
(b) "b"
(c) '6’
(d) 4
(a) Period
(b) Comma
(c) Semi-colon
(d) Question mark
- Which of the following character is used to make the end of the string?
(a) \0
(b) /o
(c) \a
(d) \n
- Local variables are also called:
(a) Automatic
(b) Normal
(c) Global
(d) None
- Which of the following loop is called counter loop?
(a) FOR
(b) WHILE
(c) DO-WHILE
(d) IF
- A loop that never ends is called:
(a) Multiple loop
(b) Finite loop
(c) Infinite loop
(d) Nested loop
VISUAL BASIC
- Which of the following reverses the Booleau Value of relational expression.
(a) AND
(b) NOT
(c) OR
(d) Neither
- _is used to specify two different choices with "if" statement
(a) Select
(b) Else
(c) If
(d) DO
- How many bytes are occupied by decimal data type in Visual Basic?
(a) 16
(b) 8
(c) 26
(d) 12
- Lists of Commands such as open, Print and Exit can be found on:
(a) Tool bar
(b) Menu bar
(c) Tool box
(d) Format bar
- The mod operator is used for:
(a) Exponentiation
(b) Multiplication
(c) Integer remainder
(d) Format bar
- All of the following are logical operator Except in Visual Basic.
(a) AND
(b) OR
(c) NEITHER
(d) NOT
- Which of the following is NOT an example of string function
(a) Abs
(b) Rtrim
(c) Lease
(d) U case
- Which keyword is used to trigger the execution of another procedure?
(a) Call
(b) GO
(c) Start
(d) RUN
- How many options can be selected if a frame contains four option buttons?
(a) 1
(b) 2
(c) 3
(d) 4
- As a computer processes instructions, one execution of a loop is known as:
(a) Cycle
(b) Duration
(c) Iteration
(d) Test
Time: 3:10 Hours
(Subjective Part) Marks: 83
Section - I
Q2. Attempt any EIGHT short questions, (8x2.16)
- What is file?
- Define database
- Write two advantages of DBMS.
- Define entity.
- List two properties of a relation.
- Who is database administrator?
- Define an attribute. Give an example.
- Define the term redundancy.
- List four facilities provided by good RDBMS.
- Define IDE.
- Define the term table in database.
- Define form.
Q3. Attempt any EIGHT short questions. (8x2=16)
- Who is a programmer
- What is an anembler
- Define object code.
- Describe variable declaration.
- Define character constant.
- Trace the error of the following code:
void main ( )
{
Int A = 10
print f ("% d”,a)
}
- What does the symbol = do in C.
- Define standard output.
- List some important functions for output.
- Which symbol is used to start format specifier?
- Trace output of the following
float i = 4.17894;
print f ("%2.2f,f);
- Trace the output void main ( )
{
print f (" 55\ t ");
print f (" 666 ");
print f (" \ n 777 ");
}
OR VISUAI BASIC
Q3. Attempt any EIGHT short questions. (8x2=16)
- What is algorithm?
- How are event procedures named?
- What is code window?
- What is anignment operator?
- Which statements can be used to declare variable?
- What is wrong in the following: dim Name as string.
- What is difference between + and & ?
- What is a condition?
- Which case value is used to test relational values?
- Define logical orperators.
- Which type of information can be used for comparison?
- Differentiate between if -else and select case statement,
Q4. Attempt any SIX short questions. (6x2=12)
- Write three advantages of switch statement in C-Language.
- What happens if break is missed in case block?
- What is the output of the following code?
int= 1 ;
int y = t = 3;
if(x == y)11(y ==t)11(t = 2)
printf(“yes")
else
print f ("No")
- Trace the errors in the following code:
void main (void);
{
Int a, b;
a = .10;
b=40
If (a < o);
b =SQ RT (a);
print f ("Result =% f , b);
getch ( );
}
- Make flow chart of while loop.
- What is output of the following code:
void main (void)
{
Int n= 1;
while ( n <= 5)
print f ("Pakistan");
n = n + I
}
getch ( );
}
- What do you mean by function call? „
- How a function returns value?
- Compare Binary and Text stream.
OR VISUAL BASIC
Q4. Attempt any SIX short questions. (6x2=12)
- List five major parts of VB IDE.
- What is Visual Basic?
- How you create executable file in Visual Basic?
- Define four in Visual Basic.
- What do you mean by caption in VB?
- List three rules of naming convensions.
- What is counter controlled loop in VB?
- What the syntax of while-wend loop in VB.
- State the purpose of Do......Loop.....until.
SECTION –II (Attempt any One Question. 8x1=8)
MS-ACCESS
QUESTION#5
(a) What is conceptual Data Model? Explain logical database design. 08
QUESTION#6
(a) What is relationship? Explain the procedure to create relationship? in MS-Access. 08
SECTION -II Attempt any TWO Question. (8x 2=16)
C-LANGUAGE OR VISUAL BASIC
C-LANGUAGE
QUESTION#7
(a) Define variable wirte down its rules. Explain its types.08
Define structured programming. What are advantages of structured programming?
C-LANGUAGE
QUESTION#8
(a). Write a program to input two integer values and an arithmetic operator calculate arithmetic operation depending upon user input operator using switch statement. 08
..OR... ..VISUAL BASIC
Write a program to input three numbers from user and tells the maximum number.
C-LANGUAGE
QUESTION#9
(a) Define "While" loop? Explain its working with syntax, diagram and example. 08
.....OR.. „VISUAL BASIC
Define "While ……wend” loop? Explain its working with syntax, diagram and example.
SECTION-III: Attempt any THREE questions. (5x3=15)
QUESTION#10
- Explain procedure of creating table in MS-Access. 05
- Explain the procedure for creating Form in design view, 05
- Write a program that calculates and print area of square with given height and width in C- Language or in Visual Basic. 05
- Write a program which displays numbers from Ito 100 in C-Language or in Visual Basic. 05
- Write a program that inputs two numbers in main function, passes these numbers to a function. The function displays the maximum number to C-Language or in Visual Basic. 05