PROGRAMMING IN 'C' Year 20
PROGRAMMING IN 'C' Year 20
BCA–C-102
B. C. A. (First Semester)
EXAMINATION, 2018-19
PROGRAMMING IN „C‟
1
Time : 22 Hours
Maximum Marks : 60
Note : All questions have to attempted.
Section—A
1. Multiple Choice questions : 1 each
(a) The array int num[26] has 26 elements.
(True/False)
(b) What is compiler ?
(c) Which of the following is not a valid variable
name declaration ?
(i) int_a3;
(ii) int_3a;
(iii) int_A3;
(iv) None of the mentioned
(d) All keywords in C are in ............ .
(i) Lower Case letters
(ii) Upper Case letters
(iii) Camel Case letters
(iv) None of the mentioned
[2] BSIT–C-303
Section—B
3. Attempt any two of the following : 6 each
(a) What is loop ? Elaborate different types of loops
in C with proper syntax and example.
(b) Discuss the difference between call be value and
call by reference with the help of a program.
(c) Explain preprocessor directives in C. Write down
macro definitions for the following with help of a
C program :
(i) To find area and perimeter of rectangle.
(ii) To find area and perimeter of square.
Also explain # pragma directive.
4. Attempt any two of the following : 6 each
(a) What do you understand by Recursion ? Write a
program generates the Fibonacci series for a
given number using a recursive function.
(b) Write down the difference between structure and
union with the help of example. Write a structure
definition having elements : name, rollno, class,
sex and height for 50 students.
(c) What is meant by the storage class ? Explain four
storage class specifications included in C.
5. Attempt any two of the following : 6 each
(a) What are command line arguments ? Write a
program to display number of arguments
passed.
[6] BSIT–C-303
BCA–C-102 90