END TERM EXAMINATION
FIRST SEMESTER [BCA] NOVEMBER-DECEMBER 2018
Paper Code: BCA-105
Subject: Introduction to Programming Languages Using C
Time: 3 Hours
Maximum Marks: 75
Note: Attempt any five questions including Q.no.1 which is compulsory. Select one question from each unit.
- Q1. Write short notes of the following (Any Five): (5x5=25)
- (a) What you mean by pre-increment and post-increment operator? Explain with an example.
- (b) Differentiate between structure and union. Explain the use of "extern" keyword.
- (c) Explain the concept of pointer? Define the dynamic memory allocation and its various functions.
- (d) Differentiate between static and register storage class in C language.
- (e) What is a string? Write program for the concatenation of two strings.
- (f) What are preprocessor directives? From which symbol do they start?
UNIT-I
- Q2. (a) Explain while loop and do-while loop with an example. Elaborate Difference between them. (4.5)
- (b) Write a program to find the largest number among the three numbers. (8)
- Q3. (a) Explain the Switch statement, Break statement, and Continue statement with an example. (6)
- (b) Write a program to find the factorial of a number using recursion. (6.5)
UNIT-II
- Q4. (a) What do you mean by pointer? How pointer variables are initialized? Write a note on pointer arithmetic with a proper example in C language. (6.5)
- (b) Write a program to find the out maximum number in array using pointer. (6)
- Q5. (a) Explain the array of pointers to functions with suitable example. (4.5)
- (b) Write the difference between call by value and call by reference with suitable example. (8)
UNIT-III
- Q6. (a) Explain the concept of structure. Write a C program to stores the information (name, roll, Branch, dept., and marks) of 10 students using structures. Find who has topped in the class. (12.5)
- Q7. Write a short note on each. (12.5)
- (i) How to pass a structure to a function?
- (ii) Bit fields
- (iii) Automatic storage classes
- (iv) File handling
UNIT-IV
- Q8. (a) Write a program to compare two strings where they are identical or not. (4.5)
- (b) Explain the following inbuild functions. (8)
- (i) Strlen()
- (ii) Strcat()
- (iii) Strlwr()
- (iv) Strupr()
UNIT-IV
- Q9. (a) Write a Program to find the largest and smallest word in a string. (4.5)
- (b) Explain the following header files. (8)
- (i) Stdlib.h
- (ii) Math.h
- (iii) Ctype.h
- (iv) Process.h