0% found this document useful (0 votes)
51 views

PROGRAMMING IN C' Year 23

This document contains an exam for a Programming in C course, with questions covering various C programming concepts like data types, operators, functions, arrays, pointers, files and more. The exam is divided into multiple choice questions in Section A and longer form questions in Sections B and C requiring explanations, examples, programs or diagrams. Students are instructed to attempt all questions covering different levels of learning outcomes and demonstrating their understanding of C programming.

Uploaded by

leeanas9911
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
51 views

PROGRAMMING IN C' Year 23

This document contains an exam for a Programming in C course, with questions covering various C programming concepts like data types, operators, functions, arrays, pointers, files and more. The exam is divided into multiple choice questions in Section A and longer form questions in Sections B and C requiring explanations, examples, programs or diagrams. Students are instructed to attempt all questions covering different levels of learning outcomes and demonstrating their understanding of C programming.

Uploaded by

leeanas9911
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

Roll No. …………………..

BCA–C-102

B. C. A. (First Semester)
EXAMINATION, 2022-23
PROGRAMMING IN ‘C’

Time : 2 21 Hours

Maximum Marks : 60

Note : All questions have to be attempted.

Section—A

1. Multiple choice questions : 1 each

(a) If the mode includes b after the initial letter, what


does it indicates ? (CO5, BL-1)

(i) text file

(ii) big text file

(iii) binary file

(iv) blueprint text

P. T. O.
[2] BCA–C-102

(b) EOF is an integer type defined in stdio.h and has


a value __________. (CO5, BL-2)
(i) 1
(ii) 0
(iii) NULL
(iv) –1
(c) What will be the value of y if x = 8 ?
(CO1, BL-1)
y = (x > 6 ? 4 : 6);
(i) Compilation Error
(iii) 0
(ii) 4
(iv) 6
(d) If you have to make decision based on multiple
choices, which of the following is best suited ?
(BL-1)
(i) if
(ii) if-else
(iii) if-else-if
(iv) All of the above
(e) The continue statement cannot be used with
________. (CO1, BL-1)
(i) for
(ii) while
(iii) do while
(iv) switch
[3] BCA–C-102

(f) The C-preprocessors are specified with


__________ symbol. (CO2, BL-2)
(i) #
(ii) $
(iii) ” ”
(iv) &
(g) Which of the following is not possible under any
scenario ? (CO4, BL-2)
(i) s1 = &s2;
(ii) s1 = s2
(iii) (*s1) . number 10
(iv) None of the mentioned
(h) How many number of pointer (*) does C have
against a pointer variable declaration ?
(CO5, BL-2)
(i) 7
(ii) 127
(iii) 255
(iv) No limits
(i) What is (void*) 0 ? (CO5, BL-1)
(i) Representation of NULL pointer
(ii) Representation of void pointer
(iii) Error
(iv) None of the above

P. T. O.
[4] BCA–C-102

(j) Local variables are stored in an area called


__________. (CO5, BL-1)
(i) Heap
(ii) Permanent storage area
(iii) Free memory
(iv) Stack
(k) In which header file is the NULL macro defined ?
(CO4, BL-1)
(i) stdio.h
(ii) stddef.h
(iii) stdio.h and stddef.h
(iv) math.h
(l) The keyword used to transfer control from a
function back to the calling function is :
(CO3, BL-1)
(i) switch
(ii) goto
(iii) go back
(iv) return
Section—B
2. Attempt any four of the following : 3 each
(a) Explain the concept of switch statement with use
of flow chart. (CO2, BL-2)
(b) Define assembler, compiler and interpreter.
(CO1, BL-1)
[5] BCA–C-102

(c) Write a program to implement fibnnoci series.


(CO3, BL-6)
(d) Elaborate the advantage of union over structure.
(CO4, BL-4)
(e) Write a program in C to implement read and write
operation in file. (CO5, BL-6)

3. Attempt any two of the following : 6 each


(a) Write a program in C to swap two number using
call by value and call by reference and show the
steps. (CO3, BL-6)
(b) Define calloc, malloc and realloc with suitable
example. Also explain its scope and significance.
(CO5, BL-2)
(c) Draw a flow chart to find greatest number among
three numbers. (CO1, BL-6)

4. Attempt any two of the following :


(a) Define recursive function. Where do we use
recursive function ? Explain recursion with
example. (CO3, BL-2)
(b) Explain the advantage of two-dimensional array
over one-dimensional array with suitable
example. (CO2, BL-4)

P. T. O.
[6] BCA–C-102

(c) Analyze the use of different storage classes in C


with suitable program. (CO3, BL-4)

5. Attempt any two of the following : 6 each

(a) Define array of pointer. Elaborate array of pointer


with the help of C program. (CO4, BL-2)

(b) Write a program in C to implement palindrome


using function. (CO3, BL-6)

(c) Explain the types of logical operator used in C


with their notation. (CO1, BL-4)

BCA–C-102

You might also like