You are on page 1of 3

[2] BCA–C-102

Roll No. ………………….. (c) ANSI committee was set up in the summer of :
(i) 1983
(ii) 1980
(iii) 1990
BCA–C-102
(iv) 1999
B. C. A. (First Semester) (d) What will be the output of the program ?
EXAMINATION, 2019 #include<stdio.h>
PROGRAMMING IN ‘C’
int main( )
Time : 2:30 Hours
{
Maximum Marks : 60
Note : All questions have to be attempted. unionvar
Section—A {
1. Attempt all multiple choice questions the choose int a, b;
correct option : 1 each };
(a) What is the similarity between a structure, union
unionvar v;
and enumeration ?
(i) All of them let you define new values v.a = 5;
(ii) All of them let you define new data types v.b =10;
(iii) All of them let you define new pointers printf(“%d\n”, v.a);
(iv) All of them let you define new structures return0;
(b) The operator used to get value at address stored in }
a pointer variable is :
(i) 10
(i) *
(ii) 20
(ii) &
(iii) 5
(iii) &&
(iv) | | (iv) 0

(B-40) P. T. O. (B-40)
[3] BCA–C-102 [4] BCA–C-102

(e) What will be the output of the program ? (h) Algorithm and Flowchart help us to :
#include<stdio.h> (i) Know the memory capacity
int main( ) (ii) Direct the output to a printer
{ (iii) Identify the base of number system
enum days {MON= – 1, TUE, WED = 6, THU (iv) Specify the problem completely and clearly
FRI SAT}; (i) The range of character data type is :
printf(%d, %d, %d, %d, %d, %d\n”, MON, TUE, (i) –128 to 127
WED, THU, FRI, SAT); (ii) 0 to 32767
return 0; (iii) 0 to 255
} (iv) None of the above
(i) –l, 0, 1, 2, 3, 4 (j) What is the value of x after execution of
(iii) –1, 2, 6, 3, 4, 5 x = 6%10 ?

(iii) –1, 0, 6, 2, 3, 4 (i) 4

(iv) –1, 0, 6, 7, 8, 9 (ii) 1


(iii) 6
(f) Array elements are stored in :
(iv) 0
(i) scattered memory locations
(k) The ANSI standard recognizes the name of
(ii) sequential memory locations
identifier for maximum length upto :
(iii) Both (i) and (ii)
(i) 31 characters
(iv) None of these
(ii) 25 characters
(g) The C language has been developed at :
(iii) 8 characters
(i) AT & I Bell Labs, USA
(iv) Unlimited characters
(ii) Borland International, USA (l) The C programs are converted into machine
(iii) IBM, USA language using :
(iv) Sun Microsystems (i) an assembler

(B-40) P. T. O. (B-40)
[5] BCA–C-102 [6] BCA–C-102

(ii) an interpreter (b) Draw a flowchart to show the logic of calculation


(iii) a compiler of factorial of a number.
(iv) an operating system (c) What are storage classes ? Explain with
Section—B examples.

2. Attempt any four of the following questions : 3 each 5. Attempt any two of the following questions : 6 each
(a) Explain the advantages of recursion. How is (a) Why do we need file operations ? Explain the
recursion different from loop ? working of four file functions.
(b) What are the uses of return( ) statements ? (b) What are pointers ? Write a program to show the
(c) What is a structure in C ? How is structure concept of double pointers.
declared ?
(c) What is dynamic memory allocation ? Discuss
(d) Do you apply algorithms in your life also ? If yes, malloc( ) and calloc( ).
give examples if no, discuss the reason.
(e) Differentiate between algorithm and flowchart.
3. Attempt any two of the following questions : 6 each
(a) Explain arrays. Explain, how memory allocation
is done in arrays.
(b) Write a program to read the elements of two
matrix of the order 3 × 3 and subtarct their
elements.
(c) Write a program to define structure with tag state
with fields state name, number of districts and
total number of districts and total population.
Read and display data.
4. Attempt any two of the following questions : 6 each
(a) Explain the different loops available in C
language with examples. BCA–C-102

(B-40) P. T. O. (B-40)

You might also like