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

KIET Group of Institutions: Roll Number:)

This document contains an exam for a Programming for Problem Solving course. It has three sections: 1) Section A contains 10 multiple choice questions worth 2 marks each on topics like operators, loops, variables, and functions. 2) Section B contains 4 programming questions worth 5 marks each, examples include type casting, patterns, and reverse of a number. 3) Section C contains 2 programming questions worth 10 marks each on recursion, palindromes, and function classifications.

Uploaded by

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

KIET Group of Institutions: Roll Number:)

This document contains an exam for a Programming for Problem Solving course. It has three sections: 1) Section A contains 10 multiple choice questions worth 2 marks each on topics like operators, loops, variables, and functions. 2) Section B contains 4 programming questions worth 5 marks each, examples include type casting, patterns, and reverse of a number. 3) Section C contains 2 programming questions worth 10 marks each on recursion, palindromes, and function classifications.

Uploaded by

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

KIET Group of Institutions

(Roll Number: )

Applied Science Department


B.Tech II Semester
CT-2 Examination, EVEN Semester (2020-21)
Programming for Problem Solving (KCS201T)
Duration: 2 hrs Max. Marks: 60

Section-A
Attempt all the questions of this section (2X10=20)
Q.
Question Marks CO BL
No.
a Differentiate between assignment and equality operators in C. 2 2 2
b Demonstrate the correlation between else-if ladder and switch statement. 2 2 3
c Differentiate while and do-while loop. 2 3 2
d Interpret the output of the given code: 2 3 2
main ()
{ for (i = 1; i<=10 ; i++)
{ if (i > 5)
break;}
printf (“%d”, i);
}
1
e Explain the type conversion hierarchy of data types. 2 2 2
f Describe the scope of local and global variables in a C program. 2 2 1
g Interpret the output of the given code: 2 2 2
main ()
{ int b = -13, c = 5;
if (a = b% c)
printf (“%d”, a); }
h Differentiate between recursion and iteration. 2 3 2
i Describe the use of keyword continue in C. 2 3 1
j Describe the use of keyword break in C. 2 3 1

Section-B
Attempt all the questions of this Section (5X4=20)
Q.
Question Marks CO BL
No.
Illustrate the term type casting in C using an example.
2 OR 5 2 3
Write a function to find largest of three numbers.
Illustrate the concept of operator precedence and associativity by using some
example.
3 OR 5 2 4
Write a program to check whether an alphabet is vowel or consonant
using switch case.
Illustrate the concept of storage classes with its types.
OR
Write a program to print the pattern:
4 12345 5 3 4
12345
12345
12345
5 Write a program to find the reverse of a number. 5 3 6

CO -Course Outcome generally refer to traits, knowledge, skill set that a student attains after completing the course successfully.
Bloom’s Level (BL) - Bloom’s taxonomy framework is planning and designing of assessment of student’s learning.
OR
Write a program to print the pattern:
A
AB
ABC
ABCD
ABCDE

Section-C
Attempt all the questions of this Section (10X2=20)
Q.
Question Marks CO BL
No.
Write a program to print the Fibonacci Series using recursive function. 10 2 3
OR
6
Illustrate the meaning of call by value and call by reference using an
example.
Write a program to check the number is palindrome or not for any arbitrary 10 3 5
number.
7 OR
Compare the four different classifications of functions. Also explain how the
values are passed between calling and called functions.

CO -Course Outcome generally refer to traits, knowledge, skill set that a student attains after completing the course successfully.
Bloom’s Level (BL) - Bloom’s taxonomy framework is planning and designing of assessment of student’s learning.

You might also like