(INTER (PART-II)
LAHORE BOARD 2017
COMPUTER SCIENCE Paper II (Objective Type)
Time Allowed: 20 Minutes Maximum Marks: 15
Group-I
Note: You have four choices 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 with marker or pen. Cutting or filling two or more circles will result in zero mark in that questions.
- Which from layout one record at a time?
(a) Tabular
(b) Columnar
(c) Datasheet
(d) Sub-form
- The degree of relation refers to the number of:
(a) Rows
(b) Tables
(c) Data
(d) Columns
- It makes very simple to create a database:
(a) Sample database
(b) Wizard
(c) Common standards
(d) Easier programming
- All the hardware costs are considered during:
(a) Project planning
(b) Requirement analysis
(c) Feasibility study
(d) Data analysis
- Insert command is used to Insert:
(a) A new record
(b) A new column
(c) A view
(d) A new table
- A set of related records that represent a unit of data is:
(a) File
(b) Record
(c) Field
(d) Database
C-LANGUAGE
- Fopen ( ) function takes…………………..parameters.
(a) 1
(b) 2
(c) 3
(d) 4
- The first line of user defined function is:
(a) Function argument
(b) Function prototype
(c) Function header
(d) Function calling
- In while loop, the loop control variable is always initialized?
(a) Outside the program
(b) Inside the loop body
(c) After loop ends
(d) Outside the body of loop
- How many loops control structures are in C?
(a) 1
(b) 3
(c) 5
(d) 7
- Which keyword is not used in switch statement?
(a) Default
(b) If
(c) Case
(d) Switch
- The conditional operator is used as alternate to:
(a) If
(b) if-else
(c) if-else if-else
(d) Switch case
- The escape sequence for carriage return is:
(a) \a
(b) \c
(c) \r
(d) \f
- How many bytes the float data types take in memory.
(a) 2
(b) 3
(c) 4
(d) 8
- C-language was developed in:
(a) 1962
(b) 1969
(c) 1970
(d) 1972
LAHORE BOARD 2017
(INTER (PART-II)
COMPUTER SCIENCE Paper II (Subjective Type)
Time Allowed: 2:10 Hours Group-I Maximum Marks: 60
NOTE:-Section I is compulsory. Answer any date Questions (Torn section II.
SECTION-I
2. Write short answers to any SIX (6) questions.
- Define data.
- Write down the basic purpose of using views.
- Define mutual exclusiveness of data.
- Differentiate between cardinality and modality.
- Define transitive dependency.
- List down any two advantages of MS-Access.
- Define sorting.
- Write down the use of filters in MS-Access.
- Write down any two differences between file processing and data base approach.
3. Write short answers to any eight parts of the following:
- List out two advantages or characteristics of C.
- Define object code.
- Write the legal characters of an identifier.
- Define assembly language.
- Define variable.
- Define standard input.
- Find any two errors of following aide
int number =6
number + +;
print f (% d \n" , number);
viii. Write down output of the following:
float f = 3.14159
print f ("f = %4.2 f" , f);
ix. Find error
{
Float area, r
Print f("Enter radius");
}
C-Language
4. Write short answers to any Six parts:
- Define conditional operator with example.
- Find the output of the following code.
# include<stdio.h>
void main ( )
{
char grade = ‘c’;
if (grade = = 'a' 11 grade = = 'b' & & grade = = ‘c’)
print f ("Fail");
else
print f("Pass")
}
- Find the error in the following code.
# include<stdio.h>
void main ( )
{
float area; r;
scan f("%c", & r);
area = 3.14*r *r;
print f("area = %f" , area);
- What is continue statement? Also give an example.
- Find output of the following code.
# include<stdio.h>
void main ( )
{
int i, p =1;
for(I=1; l<6;1+=1)
p = = 2;
print f (" p is = %d" , p);
- Convert the following code into while loop.
# include<stdio.h>
void main ( ) . .
{
int i;
while (i <5)
print f("%d \n", i);
i++;
}
}
- Differentiate between local and global variables.
- Define function declaration with its syntax.
- Write the name of two types of streams used in files in C language.
Section-II
Q.5. Write down the properties relations in detail.
Q.6. Define query. Discuss any three types of queries.
C-Language
Note: Attempt any two questions:
Q.7. Write any four steps for writing and executing C —program.
Q.8. Write a program that inputs a number from user and find it positive, negative or zero.
Q.9. Define while loop? Write its syntax and flow chart. Also explain its working with the help of an example.