You are on page 1of 4

*1636* 157A/W/14/0007

B.E (Electrical (Electronics & Power) Engineering)


Sem.-IV
Computer Programming

P. Pages : 4
Time : Three Hours Max. Marks : 80
-----------------------------------------------------------------------------
Notes : 1. Separate answer book must be used for
each section.
2. Answer three questions from Section A
and three questions from Section B.
3. Due credit will be given to neatness and
adequate dimensions.
4. Assume suitable data wherever
necessary.

SECTION - A

1. a) What are storage classes? Define all 6


storage classes with examples.

b) Write a program and flowchart to print 7


Fibonacci series up to n terms.

157A/W/14/0007 1 P.T.O
2. a) What are different sorting techniques used 9
in C language? Explain one of them with
suitable example.

b) Write a ‘C’ program to search an element 5


using linear search.

3. a) Write a C program using structure to 8


define employee record containing
employee number, name and salary. Read
10 records.

b) Explain various modes of file opening and 5


file closing.

4. a) What are the elements of object-oriented 7


programming? Explain its key components
such as objects and classes with examples.

b) What are constructors and destructors ? 6


Explain how they differ from normal
function.

5. a) Create a class student. Write a C++ 7


program to read and display following
information regarding student class
(i) name (ii) Roll number (iii) Marks.

b) Explain in detail array of structure and 6


pointer to structure.

157A/W/14/0007 2
SECTION - B

6. a) What is class? Describe the syntax for 6


declaring a class with example.

b) Design a matlab program that reads an 7


input temperature in degrees Fahrenheit
converts it to a absolute temperature in
Kelvin and writes out the result.

7. a) What are advantages and disadvantages 6


of matlab.

b) Write a program in matlab to find factorial 7


of a number.

8. a) What is the purpose of the matlab 7


command window ? The edit window, the
figure window.

b) Write a function to create a matrix of size 7


4x4 and find its transpose.

9. a) Explain plot function in matlab and 7


explain different plot functions.

b) Explain randomizing and sorting a list in 6


matlab.

157A/W/14/0007 3 P.T.O
10. a) Explain functions to read, write and 7
manipulate text in matlab with suitable
example.

b) Explain if-else, if-else-if and while loop in 6


matlab with example.

*********

157A/W/14/0007 4 214 / 50

You might also like