EE124 Sessional I
EE124 Sessional I
2. a) Explain a typical software development life cycle with the various phases in a neat 4M CO1
diagram.
b) Write a program to find the sum of n natural numbers (use the formula sum=n(n+1)/2). 2M CO1
(OR)
3. a) What happens when the value of the expression in the switch statement matches the value 2M CO2
of one of the case labels? What happens when the value of this expression does not match
any of the case labels?
b) Write a program to print reverse of the given number 4M CO2
(OR)
c) Write a program to read an array and print that array 3M CO2
d) Write a program to find maximum and minimum elements in the given array. 3M CO2
R.V.R & J.C COLLEGE OF ENGINEERING (AUTONOMOUS)
CHOWDAVARAM, GUNTUR-522019.
EE-124 - PROGRAMMING FOR PROBLEM SOLVING
ASSIGNMENT TEST- I
AcademicYear:2022-23 Time : 45Min
I/IV B.Tech (II- Sem) Max Marks :12M
1) a) Define flowchart and discuss the different symbols used in flow chart. 3M CO1
b) Write an Algorithm and program to find the roots of the quadratic equation. 3M CO1
2) a) Explain about the structure of C program 3M CO1
b) Write a c program to swap two numbers. 3M CO1
3) a) Discuss about the different types of operators used in c programming with suitable 4M CO1
examples.
b) Develop a C program for the scenario, Mr. Gupta deposited Rs.1000 in a bank. 2M CO1
The bank gives simple interest rate of 15% per annum. Write a program to
determine the amount in Mr. Gupta’s account at the end of 5 years.
4) a) Write a C program for solving the following problem: 3M CO2
Your library needs your help. Given expected and actual return dates for library
book, the program calculates the fine(if any). The fee structure is as follows:
i) If the book is returned on or before the expected return date, no fine will be
charged i.e fine=0
ii) If the book is returned after the expected date of return day but still within
the calendar month and year as expected return date, fine = Rs.(15*number
of days late)
iii) If the book is returned after the expected date of return month but still within
the calendar year and as expected return date, fine = Rs.(50*number of
months late)
iv) If the book is returned after the calendar year in which it was expected, there
is a fixed fine of Rs.1000.
b) Develop a C program using switch statement, which takes two integer numbers 3M CO2
and one operator as input from the user, performs the operation on those 2
numbers and then print the result.(Consider the operators +,-,*,/,%)
5 a) Compare the use of the if - else statement with the use of the conditional (?:) 3M CO2
operator. In particular, in what way can the ?: operator be used in place of an if -
else statement?
b) Develop a C program for multiplication table of a number from 1 to a given range. 3M CO2
6) a) What is the purpose of the for statement? How does it differ from the while 4M CO2
statement and the do - while statement?
b) Write a program to print Fibonacci series up to given number 2M CO2