Computer Science
Inter Part-II
Gujranwala Board 2016
Paper: II
Time: 20 min
OBJECTIVE
Marks: 17
Note: you have four choices for each objective 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. Attempt as many questions as given in objective type question paper and leave others blank.
MS-ACCESS AND C-LANGUAGE
- The process of arranging data into logical sequence is called:
(A) searching
(B) sorting
(C) summarizing
(D) capturing
- Which of the following is not a file type from usage point of view?
(A) master file
(B) transaction file
(C) backup
(D) index sequential file
- The super key without any extra attribute is called:
(A) candidate key
(B) primary key
(C) foreign key
(D) sort key
- Teachers students and cars are example of
(A) relationship
(B) entities
(C) attributes
(D) identifiers
- In 2NF, which of the following dependency is removed?
(A)full functional dependency
(B)partial functional dependency
(C)transitive dependency
(D)non-functional dependency
- To find a four character name that starts with F, the criteria is specified as:
(A) F***
(B) F###
(C) F*4
(D) F???
- Which of the following view is used to modify data in tables?
(A) layout view
(B) design view
(C) data sheet view
(D) pivot view
- The process of converting source code4 into object code is called:
(A) creating
(B) compiling
(C) linking
(D) executing
- The number of bytes used by a variable of type long int is:
(A) 1
(B) 2
(C) 4
(D) 8
- The format specifier used for float data type is:
(A) % c
(B) % d
(C) % x
(D) % f
- Which of the following escape sequence is used to move cursor in the beginning of current line?
(A) \ r
(B) \ f
(C) \ n
(D) \t
- Which of the following operators are used for compairing two values?
(A) logical operators
(B) relational operators
(C) arithmetic operators
(D) bitwise operators
- Switch statement is an alternative of :
(A) if statement
(B) conditional operator
(C) if-else-if statement
(D) if-else-if statement
- Which loop always executes at least once?
(A) for loop
(B) do-while loop
(C) while loop
(D) counter loop
- In for loop, which expression is executed only once?
(A) initialization
(B) test condition
(C) increment
(D) decrement
- Actual arguments are used in:
(A) function declaration
(B) function prototype
(C) function call
(D) function definition
- Which of the following functions is used to read data from a file?
(A) f putc ( )
(B) f puts ( )
(C) f printf ( )
(D) f scanf ( )
OR
MS-ACCESS AND VISULAL BASIC
- The process of arranging data into logical sequence is called:
(A) searching
(B) sorting
(C) summarizing
(D) capturing
- Which of the following is not a file type from usage point of view?
(A) master file
(B) transaction file
(C) backup file
(D) index sequential file
- The super key without any extra attribute is called:
(A) candidate key
(B) primary key
(C) foreign key
(D) sort key
- Teachers, students and cars are example of :
(A) relationships
(B) entities
(C) attributes
(D) identifiers
- In 2NF, which of the following dependency is removed?
(A)full functional dependency
(B)partial functional dependency
(C)transitive dependency
(D)non-functional dependency
- To find a four character name that starts with F, the criteria is specified as:
(A) F***
(B) F###
(C) F*4
(D) F???
- Which of the following view is used to modify data in tables?
(A) layout view
(B) design view
(C) data sheet view
(D) pivot view
- The visual basic program is saved as:
(A) VISUAL BASIC FORM
(B) VISUAL BASIC PROJECT
(C) VISUAL BASIC CONTROL
(D) VISUAL BASIC OBJECTS
- The number of bytes used by a variable of type single is :
(A) 1
(B) 2
(C) 4
(D) 8
- Which of the following buttons is not used as valid Visual Basic (VB) style in MsgBox?
(A) VbOK Retry Ignore
(B) VbOK Cancel
(C) VbOK Only
(D) VbNewLine
- Which of the following is not a valid form method?
(A) C Int ( )
(B) Cls
(C) hide
(D) load
- Which of the following operators is used for comparing two values in Visual Basic?
(A) Logical operators
(B) Relational operators
(C) Arithmetic operators
(D) Bitwise operators
- SELECT CASE structure is an alternative of :
(A) IF…THEN
(B) IF… THEN ELSE
(C) EXTENDED IF…. THEN ELSE
(D) REPEAT…UNTIL
- Which of the following loop always executes at least once?
(A) WHILE…. WEND
(B) DO….LOOP…WHILE
(C) FOR… NEXT
(D) DO…UNTIL… LOOP
- In FOR…NEXT loop, which of the following is optional?
(A) STEP
(B) Initialization
(C) NEXT
(D) TO
- Which of the following properties of Text Box control is used to get the selected text.
(A) Selected
(B) sel Length
(C) Sel Text
(D) Text
- From a group of option buttons / radio buttons, how many options can be selected?
(A) 1
(B) 2
(C) 3
(D) 4
Computer Science
Inter Part –II
Gujranwala Board 2016
Paper: II
Tim:3:10 Hours
SUBJECTIVE
Marks:83
Note: Section I is compulsory.
(SECTION-I)
2.Write short answers to any EIGHT questions: (16)
MS-ACCESS
- Define field. Gove an example.
- What is entity? Give an example.
- Differentiate between primary key and candidate key
- Who is the end user in database system?
- What is meant by cardinality of a relationship?
- Define second normal form (2NF).
- What is feasibility study?
- Define transitive dependency.
- Differentiate between form and report.
- How data redundancy is controlled in relational data bases?
- What is meant by degree of a relation?
- Why are radio buttons used in forms?
C-Language
3.Write short answers to any EIGHT questions: (16)
- Define structured programming language.
- What is a source code?
- Define object code.
- Differentiate between declaring and define a variable.
- Define the term constant.
- What is the output of the following C-Program?
- Main ( )
{
int a, b;
a = 77;
b = 40;
a+ = b;
printf (“a= %d”,a);
}
- Trace the errors of the following code.
- int mumb = 6,
++ mumber;
printf (%d \ n, number);
- Trace the errors in the following program.
- void main( );
{
float a = 3.14;
printf (“% d”, a);
getch ( );
}
- Define standard output.
- Write the use of format specifiers in C-Language.
- Determine the output of the following code segments.
- #include<stdio.h>
#include<conio.h>
void main ( )
float f = 3.14159;
printf (“f=%3.2”, f);
getch ( );
}
- Find the output of the following code.
- #include<stdio.h>
#include<conio.h>
void main ( )
{
Int a, b, c;
a = 5; b = 10;
c = a+b;
Printf (“the sum of a+b = %d”,c);
}
OR
VISUAL BASIC
3.Write short answers to any EIGHT questions: 16
- Write the names of errors in Visual Basic
- Define integrated development environment in Visual Basic.
- Define structured programming technique.
- Differentiate between property and method.
- Write the purpose of val function.
- How color of a form is changed in Visual Basic?
- Define variant type of variable.
- What does declaring a variable mean?
- Define constant.
- Write the use of logical operator.
- How comments are added in Visual Basic, Program?
- Define Active X Data Object.
C-Language
4.Write short answers to any SIX questions:12
- Why “default” case is used in switch statement ?
- Write down the syntax of conditional operator?
- Trace errors in the following code:
- void main (void)
{
int x = 10,
if (x>5&&<15)
printf (“x is valid”);
else
printf (“invalid”);
}
- Write down output of the following code:
- void main (void)
{
Char ch = ‘a’;
Seitch (ch)
{
case ‘a’’
printf (“a”);
default:
printf (“not a”);
}
- Convert following code into while loop?
- void main (void)
{
int I;
for (i = 1; i< = 10, i++)
printf (“loop”);
}
- Write down output of the following code:
- void main (void)
{
int i;
for (i = 1; i<= 2; i++)
printf (“%d”, i*i);
}
- What are local variables in C?
- What is function call ?
- What is binary stream in file handling?
OR
VISUAL BASIC
4. Write short answers to any SIX questions:
- Why CSE ELSE is used in SELEC T CASE Structure?
- Write down the syntx of IF…THEN…ELESE Structure?
- Trace errors I the following code:
- int m , n
m = 20
n = 10
IF m = > 20
n = n * n
- Write down output of the following code.
- M = 10
N = 20
P = 30
IF M < P AND P > N THEN
M = P+N
END IF
PRINT M
- Convert the following code into FOR….NEXT loop?
- I = 1
WHILE (I <=10)
PRINT “LOOP”
I=I+1
WEND
- Write down output of the following code:
- SUM = 5
WHILE (SUM<=10)
SUM=SUM+SUM
WEND
PRINT SUM
- Differentiate between procedure level and form level variables.
- List down four built-in functions in VB
- Differentiate between list box and combo box controls?
(SECTION –II)
MS-ACCESS
Note: Attempt any ONE question.
- Define file. Briefly describe the file types form usage point of view
- Discuss any four different methods of modifying a table
(SECTION – III)
Note: Attempt any TWO questions (either from “C Language” or from “Visual Basic”).
C-LANGUAGE
5. Define variable. Write down at least six rules for naming variables in C-Language. 8
6. Write a program that inputs two numbers and find whether second number is square of first number of not. 8
7. Define nested loop.Write its syntax and explain its working using an example. 8
OR
VISUAL BASIC
5. Define common mouse event. Explain any three types in detail. 8
6. Write a procedure in Visual Basic that inputs two numbers and finds the greater between them. 8
7. Define do until loop, Give its syntax and explain its working using flow chart diagram. 8
SECTION IV (PRACTICAL)
Note: Attempt any THREE parts.
9. (a) Explain the procedure to extract data from multiple table. 5
(b) Explain the procedure for crating table in MS-Access. 5
(c )Write a program that inputs a number and displays whether it is odd or even in C-Language or Visual Basic. 5
(d) Write a program which takes a number from user and displays its cube in C-Language or Visual Basic. 5
(e) Write a program that displays product of off number from 5 to 10 using for loop in C-Language or in Visual Basic. 5