Guess 1
Guess 1
NAME OF STUDENT
Guess Paper 1
___________________
_
Time: 20 minutes COMPUTER SCIENCE–II (KARACHI BOARD) Max Marks: 15
SECTION ‘A’
(MULTIPLE CHOICE QUESTIONS)–(MCQs)
NOTE: i) This section consists of 15 part questions and all are to be answered. Each question carries one mark.
ii) The correct answer bubble must be filled on OMR sheet A B C D pasted in answer script.
iii) Use only blue / black ball point pen or pointer on OMR sheet.
iv) Avoid using pencil / White-o pen on OMR sheet.
1. Select the correct answer for each from the given options:
Q2.
i. Briefly define three type of errors that can occur in computer program.
ii. What are reserved word or keywords in C? Define any four.
iii. Identify valid or invalid variables of the following.
1. number 2. You&me 3. case 4. integer 5. double 6. my-name
iv. Convert following mathematical expression in to equivalent ‘C’ expression
1
1). 𝑥 = 𝑏𝑎𝑠𝑒 ∗ ℎ𝑒𝑖𝑔ℎ𝑡 2.) 𝑥 = 3𝑎𝑏 3 ― 3𝑎 2 𝑏 3). 𝑥 = |𝑏 2 ― 4𝑎𝑐|
2
v. What is difference between arithmetic and arithmetic assignment operator?
vi. What is pointer? Why they are used in C programs?. What is purpose of indirection operator (*)?
vii. What is address operator? Give an example
viii. Differentiate between Actual Parameters and Formal Parameters.
ix. Define two ways in which arguments can be passed to function
x. Differentiate between local/internal and external global variables in C with examples.
xi. Write the following in while () equivalent
void main(void){
int a =3;
do{
printf(“%d\n”,a);
a=a+3;
}while (a==10);
xii. Write a function named max in C that receives two integer and returns maximum of two. Also write a
function named sum in C that receives two integer and returns their sum.
xiii. Write a program in C that show table of inputted number.
xiv. Write a program in C that generates following output. (use any loop)
2 4
3 6
4 8
5 10
xv Write a program in C that takes number input from user and print “number found” if number is found inside
array. int arr[5] = {1,2,3,4,5};
SECTION – C (30 Marks)