Thursday, 27 April 2017

IPU BTech Second Semester - Introduction To Programming - End Term Paper (2016)

END TERM EXAMINATION
[MAY-JUNE 2016]
SECOND SEMESTER B. Tech.
Subject Code: ETCS-08

Subject: Introduction To Programming

IPU BTech Second Semester - Introduction To Programming - End Term Paper (2016)

Time: 3 Hrs M.M: 75

Note: Attempt any six questions. Question 1 is compulsory.

Q1: Write brief note on

(a) Structure vs Union
(b) Switch statement vs Mutliple if
(c) Break vs Continue
(d) Linker, Loader vs Compiler
(e) Formal vs Actual Arguments


Q2:
(a) Differentiate between auto, static, extern, local and global variable with respect to their lifetime, scope and access rights.

(b) Differentiate between while and while-do loop with an help of an example.




Q3:
(a) Write a program in C which reads a string and after finding its length, the program should print the string in reverse order. Do not use any built-in function.

(b) What do you mean by enumerated data types? Are there different from strings? Explain their use.


Q4:
(a) Differentiate between Sequential and Random files in terms of time taken for insertion, deletion and updating of records.

(b) Explain different classifiers for formatted outputs with example.


Q5: Give function name, syntax and corresponding header file to achieve the following:
(a) To open a file in read mode
(b) To clear the input reader
(c) To clear the output buffer
(d) To read the buffered strings
(e) To read the character unbuffered.
(f) To read the whole line from input.


Q6:
(a) Write a program in C which reads an array of size n, find how many numbers in the array are even, odd and count them and print the information.

(b) Write a program in C which reads an array of integers. Each element of the array is replaced by its square. Print the array.

Q7:
(a) Differentiate between call by value and call by reference parameter passing mechanism with the help of an example.

(b) In C when arrays are passed to the function, which mechanism do they follow? Is there any relation between pointers and array name? Explain.



No comments:

Post a Comment