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

Computer Programming

Uploaded by

siddhantbinzade6
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
Download as pdf or txt
0% found this document useful (0 votes)
4 views2 pages

Computer Programming

Uploaded by

siddhantbinzade6
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
Download as pdf or txt
Download as pdf or txt
You are on page 1/ 2

B.E.

(Electrical Engineering (Electronics & Power)/Power Engineering)


Fourth Semester (C.B.S.)
Computer Programming Paper – V

P. Pages : 2 TKN/KS/16/7370/7397
Time : Three Hours *0771* Max. Marks : 80
_____________________________________________________________________
Notes : 1. All questions carry marks as indicated.

rg
2. Solve Question 1 OR Questions No. 2.
3. Solve Question 3 OR Questions No. 4.
4. Solve Question 5 OR Questions No. 6.
5. Solve Question 7 OR Questions No. 8.

.O
6. Solve Question 9 OR Questions No. 10.
7. Solve Question 11 OR Questions No. 12.
8. Due credit will be given to neatness and adequate dimensions.
9. Assume suitable data wherever necessary.

ts
10. Diagram and chemical equations should be given wherever necessary.
11. Illustrate your answers wherever necessary with the help of neat sketches.

1. a)

b) n
Explain different types of storage classes available in C with example.

Explain the structure of C program. Give an example and explain each section in detail.
7

7
de
OR
2. a) Define the terms with example.
i) Keywords. 2
ii) Identifiers. 2
tu

iii) Variables and constants. 3

b) Give the syntax of the following control statements with example. 7


i) Do-while loop. ii) If-else. iii) While loop.
S

3. a) Write a program to arrange the elements of an array of size 10 in ascending order use 7
ur

selection sort method.

b) What do you understand by an "Array"? How 1-D and 2-D arrays are initialised? Explain 6
with example.
gp

OR
4. a) Write a program in C to sort an array using Bubble sort. The array has the elements 7
{12, 2, 6, 9, 14, 0, 24}. Also explain each iteration of the sorting process.
Na

b) Explain the different methods of searching an element in an array. Explain linear search 6
technique.

5. a) What is a structure? How does it differ from an array. Explain by giving examples. 6

b) Write a program in C to print details of the 10 books using array of structures and structure 7
should contain name, price and pages.
OR
6. a) Write a program in C to copy a file to another file using input output functions. Use 7
suitable file names for source and destination files.

TKN/KS/16/7370/7397 1 P.T.O
b) What do you mean by pointers? Explain 'call by value' and 'call by reference' with example. 6

7. a) What is the difference between object oriented programming and procedure oriented 3
programming.

b) What are objects and classes in C++? 5

c) What is Inheritance? Explain multiple Inheritances. 5


OR

rg
8. Write short notes on.
i) Data Abstraction. 3
ii) Polymorphism. 3

.O
iii) Data Hiding and Encapsulation. 3
iv) Multiple Inheritance. 4

9. a) Explain in brief about various files that can be created in MATLAB and importance of 6

ts
these files.

b) Write a program in MATLAB to accept three numbers from the user. Find the sum and 7
average of the three numbers and display the result using scripts.

10 a)
n OR
Explain the different looping structures available in MATLAB with example. 6
de
b) Write a program in MATLAB to print Fibonacci series upto 10 terms. 7

11. a) Write a program in MATLAB to plot a graph for given values of x and y: 8
tu

x = [1,2,3,5,7,7.5,8,10] and
y = [2,6.5,7,7,5.5,4,6,8] with the line style as solid and line color as red.

b) Write a syntax using functions in MATLAB: 6


S

i) For creating data file.


ii) For writing to a text file.
iii) Creating a data matrix X of size m by n matrix.
ur

OR
12. a) Explain following MATLAB commands with example. 6
i) who ii) linspace (x1 ,x2, n ) iii) sort (A)
gp

b) Find transpose, inverse and determinant of the matrix A=[1,2,3;4,5,6;7,8,9]. Display the 8
result.

***********
Na

TKN/KS/16/7370/7397 2

You might also like