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

Programming in C'

Programming in c
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)
4 views

Programming in C'

Programming in c
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/ 7

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

BSIT–C-102
B. Sc. (IT) (First Semester)
EXAMINATION, 2023-24
PROGRAMMING IN ‘C’
1
Time : 2 2 Hours

Maximum Marks : 60
Note : Attempt all questions.
Section—A

1. Multiple choice questions : 1 each


(a) Choose the ‘C’ language is available for which of
the following operating systems ? (CO1, BL-6)
(i) DOS
(ii) Unix
(iii) Windows
(iv) All of the above
(b) ............... is a picture in which the flows of
computational paths are depicted. (CO1, BL-6)
(i) Algorithm

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

(ii) Program
(iii) Code
(iv) Flowchart
(c) Define the function scanf is used to ...........
(CO1, BL-1)
(i) To take logical decisions
(ii) Input a set of values
(iii) Print a set of values
(iv) Do mathematical manipulations
(d) Evaluate the following expressions according to
operator precedence used in ‘C’ 10-3% 8+6/4 :
(CO1, BL-6)
(i) 10
(ii) 4
(iii) 8
(iv) 6
(e) Which of the following represents an empty
string ? (CO3, BL-1)
(i) 10
(ii) 0
(iii) Both (i) and (ii)
(iv) None of the above
[3] BSIT–C-102

(f) Identify the following functions is more


appropriate for reading in a multi-word string ?
(CO3, BL-1)
(i) printf( );
(ii) scanf( );
(iii) gets( )
(iv) puts( );
(g) Which of the following cannot be checked in a
switchcase statement ? (CO5, BL-3)
(i) Character
(ii) Integer
(iii) Float
(iv) Enum
(h) In an array, elements are always stored in ..........
memory locations. (CO2, BL-4)
(i) Sequential
(ii) Random
(iii) Both (i) and (ii)
(iv) None of the above
(i) Identify the extension of file produced by
compiler on Windows : (CO4, BL-1)
(i) .a

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

(ii) .exe
(iii) .out
(iv) .obj
(j) Choose the right method of initializing a 2D array
is : (CO3, BL-6)
(i) int abc [2] [2] = {1,2,3,4}
(ii) int abc [ ] [ ] = {1,2,3,4}
(iii) int abc [2] [ ] = {1,2,3,4}
(iv) All of the above
(k) The ‘C’ language is ............ (CO2, BL-5)
(i) Context free language
(ii) Regular language
(iii) Context sensitive language
(iv) None of the above
(l) Identify the function getch( ) belongs to which
header file ? (CO3, BL-3)
(i) stdio.h
(ii) conio.h
(iii) math.h
(iv) None of the above
[5] BSIT–C-102

2. Attempt any four of the following (Short answer type


questions) : 3 each
(a) Write the difference between exit function and
break statement. (CO2, BL-2)
(b) What is ‘C’ ? Explain the characteristics of ‘C’.
(CO1, BL-4)
(c) Create a program to check number entered by
user is Armstrong or not. (CO3, BL-6)
(d) Explain any four string functions with examples.
(CO4, BL-4)
(e) Give difference between while statement and
do---while statement in “C”. (CO3, BL-4)
Section—B

3. Attempt any two of the following : 6 each


(a) Explain the # define and # include preprocessor
directive. Show their usage in an example.
(CO1, BL-5)
(b) Design and implement a ‘C’ program that
computes the size of int, float, double and char.
(CO2, BL-6)
(c) Write down the difference between Structure and
Union. Write a structure definition having
elements :
name, roll no, class and course for 50 students.
(CO4, BL-6)

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

4. Attempt any two of the following : 6 each

(a) What do you mean by array ? Explain the


representation of two-dimensional array. Create a
program to transpose a 3×3 matrix. (CO3, BL-6)

(b) What do you understand by actual arguments and


formal arguments ? create a program to swap two
numbers with the help of call by value and call by
reference. (CO3, BL-4)

(c) Create a program to count the number of


characters, spaces, tabs and new lines in a file.

(CO5, BL-6)

5. Attempt any two of the following : 6 each

(a) Create a program to calculate the telephone bill


for a customer of a network company. Where
conditions are as follows : (CO5, BL-6)

Call Rate Discount


<250 Fixed 500 No
>500 1/- 5%
750 2/- 7%
1000 3/- 9%
1250 4/- 11%
[7] BSIT–C-102

(b) Create a program to display the content of the file


in reverse order. (CO5, BL-6)
(c) Write a program in ‘C’ that define a structure
employee containing the details such as empno.,
empname, departmentname and salary. The
structure has to store 20 employees in an
organization. Use the appropriate method to
define the mentioned details. (CO4, BL-6)

BSIT–C-102 60

P. T. O.

You might also like