0% found this document useful (0 votes)
459 views2 pages

Pps ST 1 Paper 2021-22-Sem-1-Modified

The document contains a sessional test paper for the subject Programming for Problem Solving (KCS101T). It has two sections with multiple choice, short and long answer questions testing various concepts of C programming language like data types, operators, control structures, functions etc. It also contains questions to write programs to solve problems related to arithmetic, decision making and real world applications.

Uploaded by

lazyyy199
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
459 views2 pages

Pps ST 1 Paper 2021-22-Sem-1-Modified

The document contains a sessional test paper for the subject Programming for Problem Solving (KCS101T). It has two sections with multiple choice, short and long answer questions testing various concepts of C programming language like data types, operators, control structures, functions etc. It also contains questions to write programs to solve problems related to arithmetic, decision making and real world applications.

Uploaded by

lazyyy199
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Roll No.

G.L. BAJAJ INSTITUTE OF TECHNOLOGY AND MANAGEMENT, GREATER NOIDA


B. TECH (ODD SEM) (2021-22) – (ALL BRANCH) (A, B,C,D,E,F,G,H,I,J,K,L)
SESSIONAL TEST - 1
Programming for Problem Solving (KCS101T)

Time: 3 hours MM: 100


Note: (i) No Student will be allowed to leave the examination room before end of exam.
(ii) Diagram should be neat and clean.
(iii) Mention question number/section correctly.
(iv) Be precise in your answer.
Course Outcomes:
Following are the course outcomes of the subjects: -
CO Code Course Outcome(CO) Bloom’s Level
KCS101T.1 Remembering the fundamentals of computer and develop simple algorithms for arithmetic and L2(Understanding)
logical problems.
KCS101T.2 To translate the algorithms to programs & execution (in C language). L3(Apply)
KCS101T.3 To implement conditional branching, iteration and recursion. L3(Apply)
KCS101T.4 To decompose a problem into functions and synthesize a complete program using divide and L4(Analyze)
conquer approach.
KCS101T.5 To use arrays, pointers and structures to develop algorithms and programs. L3(Apply)

SECTION-A
Q.1 Attempt all parts. [20]
a) How does machine language differ from high level language? [KCS101T.1] [2] L2

b) Differentiate in between keywords and identifier and mention the rules to [KCS101T.2] [2] L2
construct identifier.

c) Explain the compilation and execution process of c program. [KCS101T.2] [2] L2

d) What is the characteristics and purpose of escape sequence? [KCS101T.2] [2] L2

e) Define data types in C. Discuss primitive data types in terms of memory [KCS101T.2] [2] L2
occupied, format specifies and range.

f) What is the output of the following code: [KCS101T.3] [2] L3


void main()
{
int i=-3,j=2,k=0,m;
m= ++i && ++j || ++k;
printf(“%d%d%d%d”,i,j,k,m);
}

g) Explain the basic structure of c program in brief. [KCS101T.2] [2] L2

h) What is the difference between syntax error and logical error? [KCS101T.2] [2] L2

i) Differentiate between algorithm and pseudo code. [KCS101T.2] [2] L2

j) Distinguish between Multitasking and Multiprocessing operating [KCS101T.1] [2] L2


system.
SECTION-B
Q.2 Attempt all parts [80]
a) What do you mean by digital computer? Draw a neat block diagram of a [KCS101T.1] [08] L2
computer and explain the function of each unit.
b) Differentiate between the following [KCS101T.2] [08] L2
(i) Compiler and interpreter
(ii) Linker and loader

c) Differentiate between implicit type conversion and explicit type [KCS101T.2] [08] L2
conversion in C with example. Discuss the operator precedence and
associativity of the operators.

d) What are the bitwise, unary and comma operator? Explain each in detail with c [KCS101T.2] [08] L2
example. Accept any two numbers, if first number is greater than second number
then print the sum of these two numbers, otherwise print their difference. Write
this program using ternary operator.

e) Define switch case and describe limitations for using it in a program. Write a [KCS101T.3] [08] L3
program in C to perform basic function of calculator using switch case.

f) What is operating system? Discuss responsibility of operating system and its [KCS101T.1] [08] L2
types also.

g) Write an algorithm to input number and check whether the input number is [KCS101T.1] [08] L2
prime or not. Also draw its flow chart.
h) Write a C program to accept a coordinate point in a XY coordinate system and [KCS101T.3] [08] L3
determine in which quadrant the coordinate point lies. Also draw its flow
chart.

i) Write a program in C to calculate Electricity bill of a given customer. The unit [KCS101T.3] [08] L3
consumed by the user should be taken from the keyboard and display the total
amount to pay to the customer. The charge are as follow:
UNIT Charge/unit
upto 199 @1.20
200 and above but less than 400 @1.50
400 and above but less than 600 @1.80
600 and above @2.00
If bill exceeds Rs. 400 then a surcharge of 15% will be charged and the
minimum bill should be of Rs. 100/-

j) Write a C program to evaluate the result of a student by accepting marks in [KCS101T.3] [08] L3
three subjects. If any subject mark is less than 35 then the student is failing. For
average greater than equal to 60, the student is first-class else it is 2nd class. If
the student does not fail then also display the total mark and average mark.

You might also like