LinkedIn Insight BSc.-Imperative Programming- Mumbai-April 2017 - Grad Plus

BSc.-Imperative Programming- Mumbai-April 2017

MUMBAI UNIVERSITY

Imperative Programming

Semester : 1

[Time: 2 ???????? Hours]
[ Marks:75]
Please check whether you have got the right question paper.
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) What is the role of a compiler and interpreter in programming?

b) Draw a flowchart to generate numbers from 1 to 10.

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

d) Write the rule for all numeric constants in C.

e) What is a variable’? How are they declared and used in expressions in C?

f) Determine if the following identifiers are valid in C
i.) record l
ii.) $tax
iii.) 123-45-6789
iv.) address and name
v.) file_3

 

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

a) Write a program in C to finds the area and circumference of a circle.

b) Explain the increment and decrement operator in C with example.

c) Explain the following functions in C
i.) sin( )
ii.) exp ( )
iii.) pow ( )
iv.) tolower (c)
v.) putchat (c)

d) Write a program in C to find fourth roots of a number entered by the user.

e) Describe the syntax of the scanf () statement in C.

f) Explain following with suitable example
: ? , + = and % =

 

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

a) Describe the syntax of for statement in C. Explain with suitable example.

b) Write a program in C to generate the Fibonacci series ( 0, 1, 1, 2, 3, 5, 8……) n terms using a while loop.

c) What is the conditional statement in C? Describe its various syntax.

d) Write the general syntax for function declaration and definition. Explain with example.

e) Write a function fact( ) in C to find the factorial of a number and use it to generate factorial of numbers from I to 10.

f) Explain with example various ways of calling a function in C.

 

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

a) What are storage classes in C? What is their scope in C?

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

c) What are two dimensional arrays in C? How can they be declared and initialized in C?

d) Write a program in C to find the sun of 20 double values entered by the user.

e) Write a short note on strings in C.

f) Explain the following functions in C:-
i.) strcat( )
ii.) strlen( )
iii.) strcmp( )

 

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

a) What are pointers in C? Write a program in C to add 2 float numbers using pointers.

b) Write a short note on pointer arithmetic in C.

c) Explain the terms “array of pointers” and “pointer to an array” in C.

d) Explain following declarations in C
struct
{
int acct no:
char acct_type:
char name[80];
float balance;
} account;
account cust, customer l [l0], *pc;

e) Explain the difference between structure and union in C.

f) Explain how members of a structure are accessed by a variable and a pointer in C.

Scroll to Top