Page 1
CCE RF
CCE RR
O⁄´¤%lO⁄ ÆË√v⁄ ÃO⁄–y Æ⁄¬fiO¤– »⁄flMs⁄ÿ, »⁄fl≈Ê«fiÀ⁄ ¡⁄M, ∑ÊMV⁄◊⁄‡¡⁄fl — 560 003
A
KARNATAKA SECONDARY EDUCATION EXAMINATION BOARD, MALLESHWARAM,
BANGALORE – 560 003
G—È.G—È.G≈È.“. Æ⁄¬fiOÊ⁄–, »⁄·¤^È%/HØ√≈È, 2022
S. S. L. C. EXAMINATION, MARCH/APRIL, 2022
»⁄·¤•⁄¬ D}⁄ °¡⁄V⁄◊⁄fl
MODEL ANSWERS
¶´¤MO⁄ : 01. 04. 2022 ] —⁄MOÊfi}⁄ —⁄MSÊ¿ : 74
Date : 01. 04. 2022 ] CODE NO. : 74
…Œ⁄æ⁄fl : GΔ»ÊflMmÈ” A±È O⁄MÆ⁄„¿l¡È —ÊÁ´È”
Subject : ELEMENTS OF COMPUTER SCIENCE
( À¤≈¤ @∫⁄¥¿£% & Æ⁄‚¥´⁄¡¤»⁄~%}⁄ À¤≈¤ @∫⁄¥¿£%/ Regular Fresh & Regular Repeater )
[ V⁄¬Œ⁄r @MO⁄V⁄◊⁄fl : 90
[ Max. Marks : 90
Qn. Sub.
Value Points Total
Nos. Qn.No.
1. i) FORTRAN is a
(A) high level language (B) low level language
(C) assembly language (D) machine language.
(A) high level language
1
ii) Two parts of a program can be connected by
(A) rhombus (B) capsule
(C) rectangle (D) circle.
(D) circle
1
RF/RR (A)-(200)-9015 (MA) [ Turn over
Page 2
74 2 CCE RF & RR
Value Points Total
iii) An identifier whose value does not change throughout the
program is called a
(A) variable (B) constant
(C) reserve word (D) label.
(B) constant 1
iv) The size of char data type is
(A) 1 byte (B) 2 bytes
(C) 4 bytes (D) 8 bytes.
(A) 1 byte
1
v) The escape sequence character set for end of string is
(A) \n (B) \b
(C) \0 (D) \r
(C) \0
1
vi) The maximum length of a variable in C is
(A) 64 (B) 32
(C) 16 (D) 8.
(D) 8
1
vii) The formatted output function in a computer programming
is
(A) menu ( ) (B) printf ( )
(C) scanf ( ) (D) putchar ( )
(B) printf ( ) 1
RF/RR (A)-(200)-9015 (MA)
Page 3
CCE RF & RR 3 74
Value Points Total
viii) Which symbol is used as a statement terminator in C ?
(A) ; (B) !
(C) # (D) ~
(A) ; 1
ix) An expression that outputs a numeric value is called an
(A) arithmetic expression (B) logical expression
(C) relational expression (D) algebraic expression.
(A) arithmetic expression 1
x) The equality operator is represented by
(A) = (B) :=
(C) == (D) . EQ .
(C) == 1
2. a) Define translator. 2
Translators are programs which convert high level
programs into equivalent machine level code. These
translators are essentially system software usually written
in assembly language. 2
RF/RR (A)-(200)-9015 (MA) [ Turn over
Page 4
74 4 CCE RF & RR
Value Points Total
b) Write a short note on application software. 3
These are the softwares which enable us to do specific
tasks on the computer. These softwares consist of a set of
programs to carry out operations for specific applications.
Examples :
i) Auto CAD
ii) Tally
iii) Pay plus
iv) Computered billing systems
3
c) Explain the characteristics of flowchart. 5
— easy to understand
— they are concise and precise
— flowchart is language free
— flowchart makes the program easy
— flowchart provides convenient way of documentation.
5×1 5
3. a) List the different types of expressions. 2
i) Arithmetic expressions
ii) Relational expressions
iii) Logical expressions 2×1 2
b) Explain delimiters. 3
Delimiters are symbols used to separate items, but they do
not specify any operation or yield a result.
The delimiters used in C are
# - processor directive
, - variable delimiter in variable list
RF/RR (A)-(200)-9015 (MA)
Page 5
CCE RF & RR 5 74
Value Points Total
; - statement delimiter
: - label delimiter
( ) - used in expressions
[ ] - used with arrays
{ } - used to block C statements
3
c) Mention the rules to name a variable. 5
i) Allowable characters are letters a - z & A - Z,
digits 0 - 0 and underscore ( _ )
ii) No other special character is allowed
iii) The first character must be a letter or an underscore
iv) Both upper case and lower case letter are allowed
v) Only the first six characters are significant in
standard C
vi) Reserved word cannot be used as variable name.
5×1 5
4. a) Write the conversion characters for various data types. 2
i) %d - Decimal
ii) %f - Floating point number
iii) %e - Floating point number with exponent
iv) %O - Octal number
v) %OX - Hexadecimal number
vi) %C - Single character
vii) %S - String 2×1
2
RF/RR (A)-(200)-9015 (MA) [ Turn over
Page 6
74 6 CCE RF & RR
Value Points Total
b) Explain the various arithmetic operators. 3
These are the operators used to perform arithmetic
operations on numeric data. The five arithmetic operators
available in C are listed below :
Operator Operation
+ addition
– subtraction
* multiplication
/ division
% modulus division
3
c) Draw the symbols used in system flowchart. 5
RF/RR (A)-(200)-9015 (MA)
Page 7
CCE RF & RR 7 74
Value Points Total
5×1
5
5. a) List the types of logical operators. 2
i) && logical AND
ii) || logical OR
iii) ! logical NOT 2×1 2
b) Write a C program to find largest of two numbers. 8
/* Program to find largest of 2 numbers */
# include <stdio.h>
main ( )
{
int, n, m, big ;
clrscr ( );
printf ("\n Enter two integer numbers :" );
scanf ("%d%d", &n, &m);
big = (n>m) ? n:m ;
printf ("\n the largest of %d and %d is : %d", n, m, big);
}
Enter two number : 10, 70
The largest of 10 and 70 is : 70
8
OR
RF/RR (A)-(200)-9015 (MA) [ Turn over
Page 8
74 8 CCE RF & RR
Value Points Total
a) List the types of binary operators. 2
(i) Arithmetic, (ii) Relational, (iii) Logical,
(iv) Assignment, (v) Bitwise. 2×1 2
b) Write a C program to find circumference of a circle. 8
/* Program to find circumference of a circle */
#include <stdio.h>
main
{
/* Declaration and assignment */
float Pi = 3·14159 radius = 10, circum ;
circum = 2 * Pi * radius ;
printf ("\n circumference = %f ", circum) ;
return
8
}
6. a) What are constants ? 2
These are the items which directly represent values which
will not change during the execution of the program.
Constants fall into two broad categories. Numeric
constants and Character constants. 2
b) Write a C program to find whether a given number is even
or odd. 8
8
RF/RR (A)-(200)-9015 (MA)
Page 9
CCE RF & RR 9 74
Value Points Total
7. a) Convert the following mathematical expressions into
equivalent C expressions : 2
b
i) a2 − + c2
2
2x 2 + 3x − 1
ii) .
10
i) a * a − b /2 + c * c
ii) ( 2 * x * x + 3 * x − 1 ) /10 2×1 2
b) Write a C program to find the highest marks of a student
in four exams. 8
8
RF/RR (A)-(200)-9015 (MA) [ Turn over
Page 10
74 10 CCE RF & RR
Value Points Total
8. a) Identify the errors in the following statements, if any : 2
i) P = x +y ; 5
ii) x + y = Sum ;
i) The semicolon is to come in the end.
ii) It has to be sum = x + y ; 2×1
2
b) Write a C program to convert degree Fahrenheit to degree
Centigrade. 8
8
RF/RR (A)-(200)-9015 (MA)
Page 11
CCE RF & RR 11 74
Value Points Total
9. a) What will be the value of the following expressions when
A = 3, B = 5 and C = 2 ? 2
i) S = ( A + B ) /C
ii) S = B * C /A .
i) S=4
ii) S = 10/3 = 3 ( integer division ) 2×1 2
b) Write a C program to evaluate the following expression : 8
Y 2 − XZ .
P =
2Y
8
OR
a) Differentiate between = = and = operator. 2
i) = = is an equality or relational number used for
comparison
ii) = is an assignment operator which assigns the
resultant value on its right hand side to the variable
on its left hand side. 2
RF/RR (A)-(200)-9015 (MA) [ Turn over
Page 12
74 12 CCE RF & RR
Value Points Total
b) Write a C program to calculate simple interest. 8
/* Program to calculate simple interest */
#include <stdio.h>
main ( )
{
int year;
float prin, rate si ;
printf ("\n enter principal, rate and period: ")
scanf ("%f %f %d" & prin, & rate, & year );
SI = prin * rate * year/100; 8
printf ("\n simple interest = %f," SI)
return
}
RF/RR (A)-(200)-9015 (MA)