Sahiwal Board 2017
Computer Science (Inter part2)
Note: Pour possible answers A, B; C and D to each question are given. The choice which you think is correct that circle in front that question with Marker or Pen ink. 'Lining or filling two or more circles 'will result in zero mat k in that question. Write the letter A, B. (7 or D in the column.(write correct "option) against each question also. If there k a contradiction in the bubble and hand written answer, bubble option will be considered correct.
- 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
- Open ( ) 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
SUBJECTIVE PART
(Section-I)
2. Write short answers to any SIX (6) questions.
- List files types from functional point of view.
- What Is data dictionary?
- Differentiate between fixed length field and variable length field.
- Define the term analysis.
- How is entity Integrity maintained?
- Define partial dependency.
- Name four data base objects in MS Access.
- List any four field properties.
- Differentiate between form and report.
Q.3 Write short answers to any EIGHT (8) questions.
- Differentiate between source code and object code.
- Define Header files.
- How program logic is implemented In on-structured programming languages.
- Why is It important to assign a data type to a variable?
- How does cancellation error occur?
- Find errors from the following code:
# Include < studio .h>
# Include < cono. H>
{
Void main ( ) ;
Print f ( "Assemble Language);
}
- Compare getch and getche functions.
- Find errors:
Main [ ] ;
{
float n ;
print f (" % d" ; n );
}
ix. Show output:
int l = 515 ;
Print f (" i=% 5d" ,i) ;
Print f("i=% 2d" , i);
C-Language
Q.4 Write short answers to any SIX (6) questions.
- Why default keyword is used in switch statement?
- Write down output of the following code
void main ( )
{ int x = 10;
If (x != 10)
Print f(" Hello" );
else
Print f (World");
}
- Trace the errors from following code segments.
Void main ( )
{ int x= 10,
int y = 15;
if (x=y)
Print f ( "x is equal")
}
iv. Define nested loop.
v. What will be the output?
K=O;
While (K < = 5)
{
Print f(ā% 3d % 3d \nā āK, 10-K);
K++;
}
- Convert the following loop Into do-while loop.
Do-while loop
Void main ( )
{ int I;
For (i=1; i < =10; I ++)
Print f ("%d: , i);
}
- Define local variables and their scope.
- What Is function header?
- Describe the purpose of file handling.
SECTION-II
Q. 5 Define Relation. Write down different properties of relations in detail.
Q. 6 Discuss different types of queries.
C-Language
Note: Attempt any two questions:
Q. 7 Define Language processor or translator and also explain its types.
Q. 8 Write a program in C-Language that accepts a character from the user and displays whether it is a vowel or not.
Q. 9 Define do while loop. Write its syntax and Flow Chart. Explain its working with example.