BCA-141-20 BCA-CS-141-20 C Programming

Download as pdf or txt
Download as pdf or txt
You are on page 1of 2

CS/CB

TILAK MAHARASHTRA VIDYAPEETH, PUNE


BACHELOR OF COMPUTER APPLICATIONS (B.C.A.)
& SPECIALIZATION IN CYBER SECURITY (CS)
EXAMINATION : JUNE / JULY - 2022
SEMESTER - I
Sub: C Programming (BCA–141-20 / BCA –CS–141-20)

Date : 30 / 06 / 2022 Total Marks : 60 Time: 10.00 am to 12.30 pm

Instructions:
1. All questions are compulsory unless and otherwise stated.
2. Bold figures to the right of every question are the maximum marks for that question.
3. Candidates are advised to attempt questions in order.
4. Answers written illegibly are likely to be marked zero.
5. Use of scientific calculators, Log tables, Mollier Charts is allowed.
6. Draw neat and labelled diagrams wherever necessary.

Q.1. Fill in the blanks. (5)

1. The prototype of the function can be used to --------------


a) Define a function b) Declare a function
c) run a function d) None
2. Format specifier ------------ is used to print the memory address.
a) %a b) %m
c) %s d) %u
3. Which of the following -------------- cannot be the structure member.
a) Another structure b) function
c) Array d) string
4. ------------- is the size of double data type.
a) 1 b) 2
c) 4 d) 8
5. What will fopen return, if there is any error while opening a file?
a) NULL b) EOF
c) BOF d) Depends on compiler

Q.2. State True/False. (5)

1. The C code ‘for(;;)’ represents an infinite loop.


2. Function can return multiple values.
3. Break causes early exit from the loop.
4. (9 % 2) gives 4
5. You can use one switch statement inside another switch statement.

C Programming (BCA–141-20 / BCA –CS–141-20)AID/I 1/2


Q.3. Answer the following. (Solve any 5) (10)

1. What is the difference between a++ and ++a ?


2. What will happen when you access the array more than its dimension?
3. What are comments in C?
4. What is the difference between gets() and scnaf()?
5. Why header files are included in C program?
6. What is the use of sizeof() operator?

Q. 4. Answer the following in detail. (Solve any 6) (30)

1. Explain with example logical operators available in C.


2. Explain the switch statement with syntax and example.
3. What is an array in C? How will you access the values within the array?
4. Define the term – function, Format arguments and Actual arguments with example
5. Describe different files opening modes in C
6. Explain the use of break and continue statement in loops with example.
7. Write a program to print following pattern

*1
**2
***3
****4
*****5

Q. 5. Answer the following in detail. (Solve any 1) (10)

1. Explain any five string manipulation library functions with examples.


2. Write a program to print factorial using recursive function.

__________________

C Programming (BCA–141-20 / BCA –CS–141-20)AID/I 2/2

You might also like