COMPUTER HSSC-II (2012)
SECTION-A
NOTE:- Section-A is compulsory. All parts of this section are to be answered on the question paper itself. It should be completed in the first 25 minutes and handed over to
the Centre Superintendent Deleting/overwriting is not allowed. Do not use lead pencil.
Q. 1 Circle the correct option i.e. A/BICI D. Each part carries one mark.
A. Integrated Development Environment
B. Integrated Dual Environment
C. Inter Development Environment
D. Inter Dual Environment
- The result of 17 % 3 is ___________:
A. 2
B. 3
C. 4
D. 5
- The equivalent statement of sum sum MINI IS
A. sum = -num
B. sum = num
C. sum- = num
D. sum = - - num
- Which of the following data type can store up to 255 characters only?
A. Number
B. Memo
C. Date/Time
D. Text
- To write a single character to a file which of the following function will be used?
A. putc
B. puts
C. getc
D. gets
- A collection of data containing information about a particular entity stored in an efficient and compact manner is called:
A. DBMS
B. Data
C. Record
D. None of these
- What do the C statements end with?
A. Comma
B. Colon
C. Semi colon
D. Full stop
- Which part of C will signal an error message if there is no main ( ) function in a program?
A. Editor
B Compiler
C. Linker
D. Preprocessor
- Which statement is most helpful when we have more than two actions to be taken based on different conditions'?
A. If statement
B. Else if statement
C. Switch statement
D. None of these
- Which of the following objects is used to gather selected information from a database?
A. Form
B. Query
C. Table
D. Reports
- Which of the following is NOT a valid function declaration?
A. int avg3(int a, int b, int c)
B, int 3avg(int a, intb, int c)
C. int avg3(int, int, int )
D. int avg_3(int al, int a2, int a3)
- The getche ( ) is defined in the following library file
A. stdio.h
B. conio.h
C. string.h
D. math.h
- On successfully closing a file fclose ( ) returns
A NULL
B. 0(Zero)
C. 1(One)
D. FILE Pointer
- What is a diagrammatic way of representing the relationship between the entities in a database?
A. Flow chart
B. ERD
C. DFD
D. Algorithm
- should be matched to the type of variable you want to print or read.
A. Variable type
B. Variable name
C. Format specifier
D. Escape sequence
SECTION -B
Q. 2 Attempt any THIRTEEN parts. The answer to each part should not exceed 5 to 6 lines
- a. What type of error is most difficult to find and why?
b. What are language processors and their usage?
- Write the output of the following program:
# include < stdio.h >
# include < conio.h >
void main(void)
{
int k=0:
while(k<=5)
{
printf("/03d %3d th",k,10-k):
k++;
}
getche();
- What is meant by normalization? Give two advantages of normalization
- List the types of operators used in C language Write briefly about any two of them with examples
- Write a C program that calculates the sum of the integers for each integer and gives the following output:
Integer Sum
1 1
2 3
3 6
4 10
5 15
- Differentiate between if-else and the switch statements with example.
- Give two differences between local and global variables.
- What is the purpose of the following functions:
- strien
- pow()
- fgets
- Write any three advantages of using a form.
- What is meant by function definition and function declaration? Give example of function definition and declaration.
- What is an Entity?
- What is the use of format specifier in C language program? Also give two examples of format specifier
- Following table show the records of 4 students in a class:
Student
Roll No. Name Class Phone Marks Obtained Percentage
1 Asnir XII 5517898 425 80%
2 Naseer XII 5438922 365 68%
3 Shahid XII 6786554 498 92%
4 Zubair XII 7865532 289 47%
a Select appropriate PRIMARY key for the above table
b Write query that gets the Name. Marks and Percentage of ROLL NO 3.
- Define the following
a. Compiling
b. Linking
c. Execution
- Write program that prints the table of any number by using for loop.
- Differentiate between while and do while loop with examples.
- List the tasks of Database Administrator .
SECTION - C
Note:- Attempt any THREE questions. All questions carry equal marks.
Q. 3 a. Differentiate between user defined and built-in-function
Give examples of user defined and build-In-function
Q. 4 Write a program in C-language which accepts the weight in pounds and converts it into kilograms by using a function The relationship between pounds and kilograms is as under
1 pound = 0.4536 kg
Q. 5 a. Write a C program that will print the following pattern
1
1 2
1 2 3
1 2 3 4
1 2 3 4 5
b. What is the purpose of gets and puts statements in C language?
Q. 6 a. How many types of comments are used in a C program? Explain with example
b. What meant by pre-processor directives'