0% found this document useful (0 votes)
42 views7 pages

Bca Bca 103 Introduction To Programming 2011

This document contains an exam for an Introduction to Programming course. It includes multiple choice questions, short answer questions, and long answer questions testing knowledge of programming concepts in C language. The questions cover topics such as data types, operators, control structures, functions, arrays, pointers, memory allocation, type casting, and more. The exam is divided into three sections - multiple choice, short answer, and long answer questions. Students are asked to answer questions demonstrating their understanding of fundamental programming and C language concepts.

Uploaded by

Tridib Bhunia
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)
42 views7 pages

Bca Bca 103 Introduction To Programming 2011

This document contains an exam for an Introduction to Programming course. It includes multiple choice questions, short answer questions, and long answer questions testing knowledge of programming concepts in C language. The questions cover topics such as data types, operators, control structures, functions, arrays, pointers, memory allocation, type casting, and more. The exam is divided into three sections - multiple choice, short answer, and long answer questions. Students are asked to answer questions demonstrating their understanding of fundamental programming and C language concepts.

Uploaded by

Tridib Bhunia
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

http://www.makaut.

com

Name : …………………………………………….………………
Roll No. : …………………………………………...……………..
Invigilator’s Signature : ………………………………………..
CS/BCA/SEM-1/BCA-103/2011-12

2011
INTRODUCTION TO PROGRAMMING
Time Allotted : 3 Hours Full Marks : 70

The figures in the margin indicate full marks.


Candidates are required to give their answers in their own words
as far as practicable.

GROUP – A
( Multiple Choice Type Questions )
1. Choose the correct alternatives for any ten of the following :
10 × 1 = 10

i) Which of the following operators accepts only integer


operands ?
a) + b) *
c) / d) %
ii) Do-While loop is called ...................... in C language.
a) entry controlled loop b) exit controlled loop
c) both (a) and (b) d) none of these.
iii) C supports the ...................... statement to branch
unconditionally from one point to another in the
program.
a) Continue b) Break
c) Goto d) Switch.

1104 [ Turn over


CS/BCA/SEM-1/BCA-103/2011-12

iv) An array of string ends with


a) NULL
b) last character of the string
c) 0
d) none of these.
v) The declaration of float *a[5]; is
a) a normal pointer
b) an ordinary array
c) an array of pointer
d) a pointer to an array
vi) When the pointer is incremented by one, it results the
pointer to
a) point the next element
b) increment its data value by one
c) both (a) & (b)
d) none of these.
vii) Call by reference is done with the ...................... of the
variable.
a) contents
b) address
c) both (a) and (b)
d) none of these.
viii) Static memory allocation means allocation during
...................... time.
a) compile b) run
c) allocation d) de-allocation.

1104 2
CS/BCA/SEM-1/BCA-103/2011-12

ix) The mode used for creating a text file for read/write is

(a) r+ (b) w+ (c) a+ (d) w

x) What should be the correct output of the following

program ?

main ( )

int k, num = 30;

k = ( num > 5 ? ( num < 10 ? 100 : 200 ) : 500 ) ;

printf ( "%d %d", num, k ) ;

a) 200 30 b) 30 100

c) 30 200 d) 30 500.

xi) What is the value of y in the following code ?

x = 7; y = 0;

if ( x = 6 )

y=7;

else

y = 1;

a) 7 b) 0

c) 1 d) 6.

1104 3 [ Turn over


CS/BCA/SEM-1/BCA-103/2011-12

xii) Determine the out put :


f()
{
static int i = 0;
i++;
if ( i < = 3 )
{
print f ( "\n%d", i );
f ( );
}
else
exit ( O );
}
main ( ) { f ( ) ; }
a) 1, 2 b) 2, 3
c) 123 d) None of these.

GROUP – B
( Short Answer Type Questions )
Answer any three of the following. 3 × 5 = 15

2. a) What do you mean by local variable and global

variable ?

b) Discuss on various available storage classes in C. 2+3

3. What do you mean by recursion ? Write a recursive function

called power ( ) to calculate x rise to the power n. 2+3

1104 4
CS/BCA/SEM-1/BCA-103/2011-12

4. Compare array and linked list.

5. a) Distinguish betwen structure and union.

b) Write down the following program in C :

Input an M-digit number. Print its digit one by one.

(least significant but first) 2+3

6. Write a program to print the sum of the following series of

n terms :

S = 1 + ( 1 + 2 ) + ( 1 + 2 + 3 ) + ..................

GROUP – C
( Long Answer Type Questions )
Answer any three of the following. 3 × 15 = 45

7. a) Do you have the facility of multiple way branching in


C ? If so, how ? Explain your answer with an example. 5

b) Write down the differences between 'do-while' and


'while-do' statements in C. 5

c) What is a macro ? Write down the advantages of macro


over function. 5

8. a) Give example of each of the following :

i) Function returning a pointer to an array of float.

ii) Function returning a pointer to a function


returning float.

1104 5 [ Turn over


CS/BCA/SEM-1/BCA-103/2011-12

iii) Pointer to pointer to integer

iv) Pointer to an array of integers.

v) Pointer to an array of pointers to a function

returning character. 5×2

b) Discuss on call by value and call by reference. 5

9. a) Explain with examples the meaning of explicit and

implicit type casting. 5

b) Compare between static memory allocation and

dynamic memory allocation. 5

c) Write down program in C that will accept a string from

the user and print the frequency of each characters of

the string entered. 5

10. a) What do you mean by integer division in C ? 3

b) Write a note on logical operators available in C. 5

c) Write down a program that will find out the maximum

and the minimum of the given set of n numbers (you

can examine the set of numbers only once). 7

1104 6
CS/BCA/SEM-1/BCA-103/2011-12

11. Differentiate between any three of the following : 3×5

a) Declaring a variable

b) Break and exit

c) Union and structure

d) auto and extern.

1104 7 [ Turn over

You might also like