cs11-model-paper
cs11-model-paper
EDUCATION
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.
6) Write and explain the different steps involved in problem solving? (2)
OR
11) Perform the following conversions. (3)
1) (2345)10 = ( )2
2) (7AB)16 = ( )10
3) (1100.111)2 = ( )10
*********END*********
(MODEL PAPER)
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.
(𝑎 + 𝑏)
(𝑎 −
𝑏)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;
}
#include <stdio.h>
int main()
{
int i, num, sum = 0;
if(num%i == 0)
{
sum += i;
}
}
8|
1+2+4+5+10+11+20+22+44+55+110=284
1+2+7+71+142=220
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;
11 |
a. * b. & c. && d. ||
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 |