0% found this document useful (0 votes)
8 views

cs11-model-paper

Hehe

Uploaded by

shoobhamm13
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views

cs11-model-paper

Hehe

Uploaded by

shoobhamm13
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 13

GOA BOARD OF SECONDARY AND HIGHER SECONDARY

EDUCATION

MODEL QUESTION PAPER

MID-TERM EXAMINATION
Subject:- COMPUTER SCIENCE

Std: XI
Time : 1 HOUR Max. Marks: 20 Total no. of Questions: 11

INSTRUCTIONS:
1. All questions are compulsory.
2. State your assumptions clearly.
3. MCQ’s are to be attempted only once.

1) Write the correct alternative from those given below: (1)


Which one is the Invalid Octal number representation.
A) (1234)8
B) (10101)8
C) (567)8
C) (678)8

2) Write the correct alternative from those given below: (1)


Which command of the following displayed filenames and extensions in
wide format
A) Dir/w
B) Dir/a
C) Dir/p
D) Dir/e
3) How the negative number represented in binary number system. (1)

4) How to create new directory in ms-dos. (1)

5) Write a short note on control unit. (2)

6) Write and explain the different steps involved in problem solving? (2)

7) Draw the flowchart to find the greatest of three numbers. (2)


8) Write short notes on:-
(2)
1) Interpreter.
2) Compiler.
9) Draw and labeled theblock diagram of a computer and its various components.
(2)
10) Perform the following binary arithmetic operations.
1) 101011 + 11011
2) 101111 - 111000( using 2’s compliment)
3) 10111011 / 111 (3)

11) Perform the following conversions. (3)


1) (101011)2 = ( )8
)
(25.25) )2
2 10 = (
3) (1234)8 = ( )10

OR
11) Perform the following conversions. (3)
1) (2345)10 = ( )2
2) (7AB)16 = ( )10
3) (1100.111)2 = ( )10

*********END*********
(MODEL PAPER)

FIRST TERMINAL EXAMINATION

STD: XI MARKS: 60
SUBJECT: COMPUTER SCIENCE (H-4705)
TIME DURATION: 150 MIN

INSTRUCTIONS:-
(i) All questions are compulsory.
(ii) Programs should be written in Language C only.
(iii) State your assumptions clearly.
(v) Total Number of questions is 31.
(vi) There is no overall choice, however there is an internal
choice for question number 29,30 and 31.
(vii) Figures to the right indicate full mark.

1 Write the correct alternative from those given below: 1


Number with power 2 such as 32, 16, 4, 2, 1 are represented in the
form of binary integers as
 110100
 111110
 110111
 110110.

2 Write the correct alternative from those given below: 1


First step in process of problem solving is-------
 Design a solution
 Define a problem
 Testing
 Coding

3 Write the correct alternative from those given below:- 1


What is the output of the following C program
#include<stdio.h>
int main()
{
int var=052;
printf(“%d”,var);
return 0;
}
 52
 42
 56
 Compiler error.

4 Write the correct alternative from those given below: 1


What is the output of the following C program fragment?
int a=1;
int b=1;
int c=++a || b++;
int d=b-- && --a;
printf(“%d%d%d%d”,a,b,c,d);
 1111
 0100
 1001
 1101

5 Write the correct alternative from those given below: 1


Sizeof operator return size in--------
 Bits
 Bytes
 Megabytes
 kilobytes
6 ASCII decimal range of characters from A….Z is? 1
 65-90
 97-122
 100-127
 1-28

7 Write the correct alternative from those given below: 1


What is the output of the following C program fragment?
int a=0,b=0;
int c=a++ + b++ + ++a;
int d=++a + ++b + c++;
printf("%d %d %d %d",a,b,c,d);
 3237
 3216
 3326
 3232

8 Convert the following algebric expression to C expression 1

(𝑎 + 𝑏)
(𝑎 −
𝑏)2
9 Define the term Keyword? 1
10 What is the purpose of comment statement in C language? 1
11 What is the difference between = and = = operators in C programming? 1
12 What is the significance of declaring a variable as an unsigned? 1
13 What extra step need to take to form the 2's complement of a negative 1
binary number?
14 What is Flowcharting? Draw different symbols used in flowcharting to 2
represent steps.
15 State two points of difference between compiler and interpreter. 2
16 Write any four rules of defining variables in C programming 2
Language?
17 Write any two header files with their purpose used in C programming 2
Language.
18 List Logical And Unary operators in C programming Language. 2
19 Any year is entered through the keyboard, write a C program to 2
determine whether the year is leap year or not. Use the logical
operators.
20 Perform the following conversion 2
(1010.110)2 = ( )10
(4589)10 = ( )16
21 Perform the following binary arithmetic operations. 2
1011111 + 1111111
10101010 – 11110000

22 #include <stdio.h> 2
int main()
{
int number, exp;
double result = 1.0;
printf("Enter the number: ");
scanf("%d", &number);
printf("Enter exponent: ");
scanf("%d", &exp);

// Missing code
printf("%d to the power %d is: %.0Lf", number, exp, result);
return 0;
}
Write the correct missing code to print the power of a given number
without using pow() function.

23 Consider the following program and write the correct missing code to 2
calculate the sum of positive integers entered by the user. Incase the
user enters a negative number, it should not be added to the sum.
#include<stdio.h>
Int main()
{
Int n,sum=0;
For(int i=1;i<=5;i++)
{
Printf(“\nEnter number”);
Scanf(“%d”,&n);
//Missing code
}
Printf(“\nThe sum is %d”,sum);
Return 0;
}

24 Write a complete C program to convert any given decimal number to its 3


binary equivalent.
25 Write a complete C program to print the sum of first and last digit of 3
any given number.
26 Write a complete C program to find the second largest integer number 3
from any three unique given numbers.
27 A positive integer is entered through the keyboard. Write a complete C 3
program to obtain and print the prime factors of this number.
Ex:- Prime factors of 24 are 2, 2, 2, and 3
28 3

#include <stdio.h>

int main()
{
int i, num, sum = 0;

printf("Enter any number ");


scanf("%d", &num);

for(i = 1; i <= num / 2; i++)


{

if(num%i == 0)
{
sum += i;
}
}

if(sum == num && num > 0)


{
printf("%d is PERFECT NUMBER", num);
}
else
{
printf("%d is NOT PERFECT NUMBER", num);
}
return 0;
}
Alter any three instructions from above code and write modified code
to check given number is Prime Number or not.
29 Perform the following conversion 4
1) (101010)2= ( )10
2) (1234)10 = ( )2
3) (123)8 = ( )2
4) (10101010)2 = ( )8
OR
29 Perform the following conversion
5) (101010)2= ( )16
6) (1234)10 = ( )8
7) (123)8 = ( )16
(10101)2 = ( )10
30 Write a complete C program to check if the given number is Happy 4
Number or Not .
Note:- Happy number is a any positive integer, replace the number by
the sum of the squares of its digits, and repeat the process until
the number either equals 1, or it will end at '4'. if Number is 1 than it is
Happy Number else if it end at 4 it is not Happy.
For Ex:- To check whether 19 and 25 are happy or not
N=19 N=25
2 2
N=1 +9 =82 N=22+52=29
2 2
N=8 + 2 = 68 N=22+92=85
N=62 + 82 = 100 N=82+52=89
N=12+02+02 = 1 N=82+92=145
N=1 i.e its Happy Number N=12+42+52=42
N=42 +22=20
N=22+02=4
N=4 so number is Not Happy Number
OR
30 Write a complete C program to check Given two numbers are amicable
numbers or not

Note:- Two different numbers are said to be so Amicable Numbers if


each sum of divisors is equal to the other number.
Amicable Numbers are: (220, 284), (1184, 1210), (2620, 2924), (5020,
5564), (6232, 6368) etc.

Example– 220 and 284 are Amicable Numbers.

Divisors of 220 = 1, 2, 4, 5, 10, 11, 20, 22, 44, 55, 110

8|
1+2+4+5+10+11+20+22+44+55+110=284

Divisors of 284 = 1, 2, 7, 71, 142

1+2+7+71+142=220

31 Write the output of following programs

1) 2) 4
int main() int main()
{ {
int i = 1; int x;
do x = 10;
{
printf("%d\n", i); if(x > 10)
i=i+2; x -= 10;
if (i % 5==0) else if(x >= 0)
break; x += 00;
} while (1); else if(x)
x += 10;
getchar(); else
return 0; x -= 10;
}
printf("%d\n",x);
return 0;
}

3. 4.
int main() int main()
{ {
int a = -10, b = 20; int a= -1,b = -a;
int x,y;
if(a > 0 && b < 0)
a++; x = (a> 0) && (b < 0) || (a<
else if(a < 0 && b < 0) 0) && (b > 0);
a--; y = (a<= 0) || (b >= 0) &&
else if(a < 0 && b > 0) (a>= 0) || (b <= 0);
b--;
else printf("%d\n",x == y);
b--;
return 0;
printf("%d\n",a + b); }
return 0;
}

9|
31 OR
1. 2.
int main() int main()
{ {
int x = 400, y, z; int p = 800, q, r;
if (x >= 500)
y = 400; if (p >= 700)
z = 300; q = 600;
printf("%d %d\n", y, z);
r = 500;
return 0;
} printf("%d %d\n", q, r);

return 0;
}
3. 4.
int main() int main()
{ {
int p = 4, q, r; int i = 0;
do
q = p = 15; {
r = p < 15; i++;
if (i == 2)
printf("p = %d q = %d r continue;
= %d\n", p, q, r); printf("In while loop ");
} while (i < 2);
return 0; printf("%d\n", i);
} }

10 |
SUB: COMPUTER SCIENCE(H4705)
STD: XI
SECOND TERMINAL EXAM MODEL PAPER 2024-25
MARKS: 60
Instructions:
1. All questions are compulsory.
2. Question 1 to 7 must be attempted once.
3. Programs should be written in C language only.
4. SECTION A & B carry 1 mark each.
SECTION C carry 2 marks each.
SECTION D carry 3 marks each.
SECTION E carry 4 marks each.
SECTION A
Q.1 Which of the following function is more appropriate for reading 1
multiword in a string?
a. scanf()
b. printf()
c. gets()
d. string()
Q.2 Size of the array need not be specified, when 1
a. initialisation is a part of definition
b. it is a declaration
c. it is calling of function
d. All of the above.
Q.3 Choose correct statement about Functions in C Language. 1
a. A Function is a group of c statements which can be reused
any number of times
b. Every Function need to be call to execute.
c. Every Function may or may not return a value
d. All of the above
Q.4 Which of the following is a complete function. 1
a. int funct(int x);
b. int funct(int x){return x++;}
c. int funct(int){printf(“x”);}
d. int funct(x){printf(“x”);}
Q.5 What is the length of an array when its first index denoted by i and 1
the last index denoted by j?
a. length of an array=i+j;
b. length of an array=j-i-1;
c. length of an array=j-1;
d. length of an array=j-i+1;

Q.6 The operator used to get value at address stored in a pointer 1


variable is

11 |
a. * b. & c. && d. ||

Q.7 If the two string are identical , then strcmp() returns 1


a. -1
b. 1
c. 0
d. NULL
SECTION B
Q.8 Define an Array. 1
Q.9 State the precondition to perform binary search. 1
Q.10 What is a pointer? 1
Q.11 Define Structure. 1
Q.12 Write the names of the header files to which the following 1
functions belong:
i) strcat() ii) pow()
Q.13 Consider the following declaration statement: 1
void sample(int x, int y, int z=10);
State the concept involved in above declaration.
SECTION C
Q.14 Binary search is more efficient than linear search. Why? 2
Q.15 State any two points of difference between Array and Structure. 2
Q.16 State the different function prototypes used in C. 2
Q.17 Perform insertion sort in ascending order on the following list of 2
numbers
8 , 20, 3, 6, 5, 10 . And display the content of array after each
pass.
Q.18 State any two points of difference between call by value and call by 2
reference.
Q. 19 What are the benefits of Structure in C programming? 2
Q. 20 #include <stdio.h> 2
void junk(int *i, int *j);
int main()
{
int i=5,j=2;
junk(&i,j);
printf(“\n %d%d”,i,j);
return 0;
}
Void junk(int *i, int j)
{
*i=*i * *i;
j=j*j;
}
Q.21 Write a user defined function named sumofdigits() to find the sum 2
of the digits of the given N number. for. e.g if N=234
sum=2+3+4=9

12 |
Q.22 What are the uses of Pointers? 2
Q.23 Write a complete C program to count number of words in a given 2
string.
SECTION D
Q.24 Explain various string functions used in C programming. 3
Q. 25 Write a complete C program to swapping the values of two 3
variables by illustrating the concept of call by value and call by
reference.
Q.26 Write a Complete C program to check whether given word is 3
palindrome or not with out using library string functions.
Q.27 Write a complete C program to search element using Binary search 3
techniques
Q.28 Write a complete C program to illustrate the concept of call by 3
value and call by reference.
SECTION E
Q.29 Write a complete C program to perform Bubble sort technique to 4
sort elements in Ascending order.
Q.30 Consider the following structure declaration : 4
struct customer
{
int acc_no;
char name[20];
float bal;
};
Struct customer cust[200];
void withdrawal(int ano,float amount);
Define the above function withdrawal to withdraw the amount:-
1) Withdrawal amount should be minimum Rs.100.
2) Minimum balance amount in account should be Rs.100.
3) If the balance in account is less than 100 than print message
balance is insufficient as well as balance in account.
Q.31 Define a function MERGE() that passes two 1-D array A[], B[], 4
which are in ascending order as an parameter and m , n of integer
type that passes size of array A and B respectively. Merge the two
A[] and B[]arrays in C[] array in ascending order.
if A[]={1,3,5,6} and B[]={2,4,7,9}
then array is C[]={1,2,3,4,5,6,7,9}
OR
Q.31 Write a compete C program to find length of string, total number of 4
words in string without using any library string functions.

13 |

You might also like