LinkedIn Insight BSc.-Imperative Programming- Mumbai-November 2018 - Grad Plus

BSc.-Imperative Programming- Mumbai-November 2018

MUMBAI UNVERSITY

Imperative Programming

Semester : 1

(2½ Hours)
[Total Marks: 75]
N. B.: (1) All questions are compulsory.
(2) Make suitable assumptions wherever necessary and state the assumptions made.
(3) Answers to the same question must be written together.
(4) Numbers to the right indicate marks.
(5) Draw neat labeled diagrams wherever necessary.
(6) Use of Non-programmable calculators is allowed.
____________________________________________________________________________________________________________________________________________

Q. 1) Attempt any three of the following: (15M)

a) Explain the different types of programming language.

b) Explain the different steps in the program development cycle.

c) Draw the flowchart and  pseudo code of program that doubles a number.

d) Describe the structure of a C program.

e) What are the various data types in C? Explain them.

f) What is a statement in C? Explain the different classes of statement in C.

 

Q.2) Attempt any three of the following: (15M)

a) Write a program in C to swap two numbers without using third variable.

b) Describe the five arithmetic operators in C.

c) Explain the conditional operator in C.

d) Explain the getchar and putchar functions used in C programming language.

e) Write a short note on scanf function.

f) Explain the gets and puts functions used in C programming language.

 

Q. 3) Attempt any three of the following: (15M)

a) Explain if-else statement with an example.

b) Write a program in C to find the sum of squares of digits of a number.

c) What is the difference between while and do-while loop in C?

d) Explain the function with an example.

e) Write a program in C to find the factorial of a number using recursion.

f) Explain call by value and call by reference.

 

Q. 4) Attempt any three of the following: (15M)

a) What is meant by the storage class of a variable?

b) Write a short note on Global variable.

c) Write a program in C to calculate successive Fibonacci numbers.

d) What are preprocessor directives in C? Explain #include and #define in C.

e) Write a program in C to arrange the ‘n’ numbers stored in the array in ascending order.

f) What is a two dimensional array? How can they be declared and initialized in C?

 

Q. 5) Attempt any three of the following: (15M)

a) Explain the term pointers with an example.

b) Write a C program to perform addition of two pointer variable.

c) Write a short note on pointer arithmetic.

d) Differentiate between structure and union.

e) What is an array within the structure and array of structure?

f) Explain nested structure in C with an example.

Scroll to Top