MU First Year Engineering (Semester 2)
Structured Programming Approach
December 2015
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) What do you mean by register and static storage class. Explain with example.
4 M
1 (b) State any 2 library function in string.h with example.
4 M
1 (c) Explain any 2 bitwise operation in C with example.
4 M
1 (d) Explain the difference between while and do.. while loop.
4 M
1 (e) Explain pow(), abs(), isalnum() and ceil() function.
4 M

2 (a) What is the use of structure? Explain with an example. Also explain the concept of nested structures.
10 M
2 (b) Write a program in C to find minimum number in an array.
10 M

3 (a) Write a program which will accept 2 dimensional square matrix and find out transpose of it. Program should not make use of another matrix.
10 M
3 (b) With reference to parameter passing to function explain call by value and call by reference with an example.
10 M

4 (a) Write a program to search a number within the array.
10 M
4 (b) What do you mean by recursion? Write a program which will add first n natural numbers using recursion.
10 M

5 (a) Write a program in C to implement following summation of series upto n terms.
1-x2/2!+x4/4!-x6/6!+x8/8!-....
10 M
5 (b) What do you mean by FILE? What are the different functions available to read data from file? Specify the different modes in which file can be opened along with syntax.
10 M

6 (a) Generate the following pattern of digital using nested loops.
i)         1      
        2 3 2    
      3 4 5 4 3  
    4 5 6 7 6 5 4

ii)   *        
    * *      
    * * *    
    * * * *  
    * * * * *
10 M
6 (b) Write a function to check whether the given number is Armstrong number or not. An Armstrong number is a number in which sum of cube of its all digits is equal to number itself. For example, 371 is an Armstrong number, since 33+73+13=371. Use above function to generate all Armstrong numbers between 1 to 1000.
10 M



More question papers from Structured Programming Approach
SPONSORED ADVERTISEMENTS