END TERM EXAMINATION
SECOND SEMESTER B. Tech.
Subject Code: ETCS-08
Subject: Introduction To Programming
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
(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.
(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.
(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.
(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.
(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.