Page 1
Government of Karnataka
Karnataka Secondary Education Examination Board
Question Paper
ANSWER KEY
Page 2
A
CCE RF/RR
PÜ®ÝìoPÜ ÍÝÇÝ ±ÜÄàûæ ÊÜáñÜᤠÊÜåèÆÂ¯|ì¿á ÊÜáívÜÈ, ÊÜáÇæÉàÍÜÌÃÜí, ¸æíWÜÙÜãÃÜá & 560 003
KARNATAKA SCHOOL EXAMINATION AND ASSESSMENT BOARD,
MALLESHWARAM, BENGALURU – 560 003
ÊÜÞ¨ÜÄ EñܤÃÜWÜÙÜá
MODEL ANSWERS
—⁄MOÊfi}⁄ —⁄MSÊ¿ : 54 CODE NO. : 54
ËÐÜ¿á : ±æäÅàWÝÅËáíW… C®… GG®…GÓ…I "Ô'
Subject : PROGRAMMING IN ANSI ‘C’
(ÍÝÇÝ A»Ü¦ì / ÍÝÇÝ ±Üâ®ÜÃÝÊÜ£ìñÜ A»Ü¦ì)
( Regular Fresh / Regular Repeater )
¶´¤MO⁄ : 01. 04. 2025 ] [ V⁄¬Œ⁄r @MO⁄V⁄◊⁄fl : 80
Date : 01. 04. 2025 ] [ Max. Marks : 80
Qn.
Value Points Total
1. C language was developed by
(A) Charles Babbage (B) Steve Babbage
(C) Dennis Ritchie (D) Graham Bell
(C) Dennis Ritchie 1
2. What is required in each C program ?
(A) The program must have at least one function
(B) The program does not require any function
(C) Input data
(D) Output data
(D) Output data 1
CCE RF/RR(A)/101/1832 (MA) [ Turn over
Page 3
54 2
Qn.
Value Points Total
3. The bitwise AND operator is
(A) && (B) &
(C) ! (D) =
(B) & 1
4. The rule of a grammar in a C character set is known
as
(A) main (B) syntax
(C) scan (D) print
(B) syntax 1
5. Which is an unconditional branching statement ?
(A) do ... while (B) switch
(C) if ... else (D) goto
(D) goto 1
6. Repeated execution of a set of statements is called
(A) nesting (B) loop
(C) break (D) while
(A) nesting 1
7. The size of the int data type is
(A) 2 bytes (B) 1 byte
(C) 3 bytes (D) 5 bytes
(A) 2 bytes 1
8. Statement terminator is represented by the symbol
(A) ! (B) ;
(C) # (D) @
(B) ; 1
CCE RF/RR(A)/101/1832 (MA)
Page 4
3 54
Qn.
Value Points Total
9. The escape character used for horizontal tab is
(A) \t (B) \h
(C) \ht (D) \f
(A) \t 1
10. The conversion specification character for
hexadecimal number is
(A) %OX (B) %C
(C) %S (D) %d
(A) %OX 1
11. a) Mention the applications of C language.
Applications of C :
1. Compilers
2. Loaders
3. Operating system
4. DBMS 2
b) Classify the types of C constants.
Classification of constants :
1. Primary constants
2. Secondary constants 3
c) Write the structure of C program.
C programs have a defined structure. The structure
of C consists of the following parts :
— Documentation section
— Pre-processor directives
— Variables and function declarations
— Main function
— Declaration part
— Executable part
— Other functions 5
CCE RF/RR(A)/101/1832 (MA) [ Turn over
Page 5
54 4
Qn.
Value Points Total
12. a) Explain string constants.
A string constant of zero or more number of
characters enclosed within double quotes. The
characters within quotes could be digits, characters
and blank spaces. 2
b) Explain the use of logical operators.
Logical operators are used to combine two or more
logical expressions :
! logical NOT
&& logical AND
|| logical OR 3
c) Write a short note on declaring variables.
A variable is an identifier used to store a single data
item. This data could be a numerical quantity or a
character constant. During execution of the program,
data must be assigned to the variable. Therefore a
variable can take different values at different times
during the execution of the program. The data stored
in the variable can be accessed any time, by referring
to the variable name. 5
13. a) List the data types in C language.
1. integer
2. character
3. float
4. double 2
CCE RF/RR(A)/101/1832 (MA)
Page 6
5 54
Qn.
Value Points Total
b) Define constant.
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 and character constants. 3
c) Write the classification of C tokens.
C-tokens — smallest meaningful unit of a C program
is known as a token. C tokens may be classified as
follows :
5
14. a) Explain printf ( ).
printf ( )
Through this function all types of variables of any
size can be displayed on the screen. Formatted
output can be obtained with printf and it works
similar to scanf function syntax :
printf ("controlstring", variable 1, 2); 2
CCE RF/RR(A)/101/1832 (MA) [ Turn over
Page 7
54 6
Qn.
Value Points Total
b) Write a C program to find the area of a square.
/*Program to find area of square*/
#include <stdio.h>
main ( )
{
float side, area ;
side = 5
area = side * side ;
printf ("\n area of square =%f", area);
} 8
15. a) Explain do ... while statement.
The do while statement is an exit-controlled
structure. In this structure the body of the loop is
evaluated first. The test condition is checked next. If
the condition is true, control is transferred back to
the beginning of the loop. When the condition is false
control is transferred to the next statement outside
the loop. 2
b) Write a C program to find the given number is odd or
even.
/* Program to find given number is odd or even */
#include <stdio.h>
main
{
int x ;
clrscr ( ) ;
printf ( "\n Enter a number :");
scanf ( "%d", &x );
( x % 2 = = 0 ) ? printf ("\n %d is even", x );
printf ("\n %d is odd", x);
} 8
CCE RF/RR(A)/101/1832 (MA)
Page 8
7 54
Qn.
Value Points Total
16. a) Explain if ( ) statement.
if ( ) statement is one of the most powerful statement
of any programming language. It is used to carry out
logical test of the condition and take one of the two
possible actions depending on the result of the test.
The statement can be written as
if (conditional expression)
S1;
S2; 2
b) Write a C program to convert temperature in degree
Celsius to degree Fahrenheit.
#include <stdio.h>
int main ( )
{
float fah, cel ;
cel = 2H
fah = (( cel * 9 )/5 +32);
printf ("\n\n Fahrenheit is : %f" fah) ;
return (0);
} 8
17. a) Explain scanf ( ).
scanf ( ) — data can be input to the computer from a
standard input device by using library function
scanf ( ). Any type of data like numerical values,
character values, string values, or their combination
can be input through scanf ( ). 2
CCE RF/RR(A)/101/1832 (MA) [ Turn over
Page 9
54 8
Qn.
Value Points Total
b) Write a C program to read two integer numbers and
find the sum of these two numbers.
#include <stdio.h>
int main ( )
{
int n1, n2, sum ;
prinft ("enter two integers :");
scanf ("%d %d", &n1, &n2);
sum = n1 + n2;
printf ( "%d + %d = %d", n1, n2, sum ) ;
return 0;
} 8
CCE RF/RR(A)/101/1832 (MA)
Page 10
AglaSem Earn While You Learn Program!
Share your recent question papers with us and get paid!
अपने हाल के न प हम भेज और कमाएँ!
To participate, email us with the following details:
भाग लेने के लए हम न न ववरण के साथ ईमेल कर:
- Your Name
- Your Class
- Your Board
- Details of the Question Papers you have
आपके पास उपल ध न प का ववरण
Our team will reach out to you with the next steps.
हमार ट म आगे क या के लए आपसे संपक करे गी।
Email: support@
Page 11
Study Materials
Notes
Model Papers Class 6 Notes
Sample Papers Class 7 Notes
Half Yearly Sample Papers Class 8 Notes
Class 9 Notes
Important Resources
Class 10 Notes
Periodic Table
Class 11 Notes
Writing Skills / Formats
Maps of India / World Class 12 Notes
Books and Solutions
NCERT Books
NCERT Book Solutions
HC Verma Chapter Wise Solutions
RD Sharma Solutions
CGBSE Solutions