West Bengal Institute of Technology (WBIT) 2008 B.C.A Computer Application 103 Introduction to Programming ( ) - Question Paper
1
CS/BCA/SEM-1 /BCA-103/08/(09) 3
ENGINEERING & MANAGEMENT EXAMINATIONS, DECEMBER - 2008
Time : 3 Hours ] . [ Full Marks : 70
GROUP - A ( Multiple Choice Type Questions)
1. Choose the correct alternatives for the following : 10 x 1 * 10
i) By default, functions are assigned.....................storage class.
a) auto b) extern
c) static d) register.
A) Maximum number of elements in the declaration int arr [ 8 ] [ 5 ]; is
a) 40 b) 13
c) 3 d) 39.
Iii) The default return type of any C function is
a) a charter value b) a decimal value
c) an integer value d) void.
iv) When both global and local variables have the same name, will access the
a) local variable b) global variable
c) compilation error d) none of these.
v) A union is a collection of
a) heterogeneous elements b) homogeneous elements
c) specific elements d) none of these.
CS/BGA/SEM- 1/BGA-103/08/(09) 4
vl) How many times will the loop be executed ? for(i = l;i< = 10;i + +)
{
printf("\Hello") ; i+=3 ;
}
b)
a) 10 c) 3
d) none of these.
vii) Which of the following is not a relational operator ?
b)
d)
a) <
c) II
<=
viii) Which operator is not a binary operator ?
b)
d)
a) + c) * r
ix) In C, size-of is
a) an operator c) a macro
++
none of these.
b) a function d) none of these.
x) Array passed as an argument to a function is interpreted as
a) maximum number of elements that the array can hold
b) value of the first element of the array
c) address of the first element of the array
d) none of these.
GROUP -B ( Short Answer Type Questions )
Answer any three of the following.
3 x 5 = 15 5 5
2l+2|
5
3 + 2
3 x 15 = 45
2. Draw a flow-chart of the factorial of a user given number.
3. Write a program to add the following series :
- 1 + 2/2! + 3/3! + ..............: + n/nt, value of n given by user.
4. Write short notes on continue and break statements.
5. What is loop ? Discuss various types of loop used in C.
6. What are Keywords and Identifiers ? What Is Ternary operator ?
GROUP -C (Long Answer Type Questions )
* Answer any three of the following.
7. a) What do you mean by algorithm ?
b) Explain the properties of algorithm.
c) How does an algorithm differ from a pseudo-code ?
d) Design a flow-chart to find out the maximum of n numbers.
e) Illustrate decision table by a suitable example.
2+5+2+3+3
8. a) What do you mean by recursion ?
b) Write a recursive function in C to produce n01 Fibonacci number.
c) What are the major drawbacks of using recursion ?
d) What is preprocessor directive ?
e) Differentiate between function and macro in C.
3+4+2+2+4
9. a) Why Is nesting if else loop used ?
;
)
b) What do you mean by high level language ?
c) What is string, h ?
. /
d) Write down a C-program to find out the summation of following series :
( 1 ) + ( 1 + 2 ) + ( 1 + 2 + 3 ) + ............+ (1 +2 + 3 + 4 +.........+ n)
, 2 + 2 + 1 + 10
10. a) What is the difference between structure and union ?
b) What is global declaration ?
c) What is expression ?
d) Write a program which will merge the content of twp files and copy into another blank file. 2 + 2+1 + 10
11. Discuss various operators used In C. Write a program in C to print -all numbers between 100 and 200 which are divisible by 5 but not divisible by 15. 15
END
11408 ( 11/12 )
Attachment: |
Earning: Approval pending. |