MORE IN Structured Programming Approach
MU First Year Engineering (Semester 2)
Structured Programming Approach
May 2013
Total marks: --
Total time: --
INSTRUCTIONS
(1) Assume appropriate data and state your reasons
(2) Marks are given to the right of every question
(3) Draw neat diagrams wherever necessary

1 (a) Explain the purpose of the following standard library functions:-
(i)floor()
(ii)ceil()
(iii)sqrt()
3 M
1 (b) Explain how a problem is defined with a suitable example.
4 M
1 (c) Explain the difference between for, while and do..while loops.
3 M
1 (d) Explain the difference between call by value and call by reference.
4 M
1 (e) Explain any three string standard library functions.
3 M
1 (f) Explain reference and de-reference operators with examples.
3 M

2 (a) Explain various storage classes used in C with examples.
5 M
2 (b) Write a program to calculate the sum of a list by passing array to a function.
5 M
2 (c) Write a C program to create an array of structure to store the details of almost 100 employees. Sort it according to employee ID. Employee details are Employee name, Employee ID and salary.
10 M

3 (a) Write an algorithm and draw a flowchart to calculate the roots of quadratic equation.
6 M
3 (b) Write a program to display Pascal triangle.
A
A B
A B C
A B C D
A B C D E
6 M
3 (c) Explain Recursion concept. Write a program to display Fibonacci Series using recursion.
8 M

4 (a) Write an algorithm to sort a set of numbers in ascending order.
For above problem in which cases time complexity is calculated?
6 M
4 (b) Write a program to display Armstrong numbers between 1 to 1000.
6 M
4 (c) Write a program to calculate matrix multiplication and transpose for a matrix.
8 M

5 (a) Write the output for the following program:-
#include
void main()
{
int x = 10, y, z;
z = y = x;
y -= --x;
z -= x--;
x -= --x x--;
printf( x = %d y = %d z = %d , x, y, z);
}
6 M
5 (b) Write a program to calculate the sum of the series1/2 + 3/4 + 5/6+ .. + n terms
6 M
5 (c) Write a program to sort given numbers in descending order.
8 M

6 (a) Explain the difference between the switch statement, ladder of if-else and nested if-else.
6 M
6 (b) Write a recursive program to calculate the factorial of accepted number.
6 M
6 (c) Write a program to validate whether accepted string is palindrome or not.
5 M
6 (d) Explain how to read the contents of file and write into the file with syntax.
3 M

More question papers from Structured Programming Approach