West Bengal Institute of Technology (WBIT) 2009 B.C.A Computer Application 103 Introduction to Programming ( ) - Question Paper
, , ' > * '
s *'
fr \ .
amc :..........................................................\
.' '***#*> y i g
Roll No. : .....................................................'?p<ZyJJ
Invigilators Signature : ...................................
CS/BCA/SEM-1 / BCA-103/2009-10 2009
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 the following : 10 x 1 = 10
i) A filter point is a
a) stream pointer
b) buffer point
c) pointer to FILE data type
d) - all of these.
ii) Which is not a storage class ?
a) auto b) struct
c) typedef d) static.
iii) 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.
iv) How is a variable accessed from another file ?
a) The global variable referenced via the global specifier
b) The global variable is referenced via, the autospecifier
c) The global variable is referenced via the extern specifier
d) The global variable is referenced via the pointer specifier.
v) main ()
{
int a = 3;
printfl%d%d%d%d%d,a++, +*+a, ++a, a++);
}
a) 3566 b) 6653
c) 3565 d) 6666.
vi) main ()
{
printfl%d%d%d%d",sizeof(3.14f),sizeof(3.14),sizeofl(314))
}
a) 422 b) 421
c) 482 d) 442.
yii) If the array begins at address 6548 ? main ()
{
total ] = { 12, 14, 15, 23}; printfr%u%u,a,&a);
}
a) 6548 6558 b) 6548 6548
c) 6548 6550 d) none of these.
viii) How many times the message Hello will be printed in the following program ?
void main ()
int x;
for(x=-l; x<=10; x++)
{
if (x<5) continue; else break;
printfTHello);
}
}
b) 10 times
a) 11 times
d) 0 times.
c) once
ix) What would be the correct output of the following program ? ,
void main ()
int k, num=30;
k=(num>5? (num<=l 07100:200): 500); printlT%d%d ,num,k);
}
b) 30 100
a) 200 30
d) 30 500.
x) Choose the correct output: void main ( )
{
char str[20]=Hello; char * const p=str;
*p=M;
printf(%s,str);
}
a) Mello b) Hello
c) HMello d) MHello.
GROUP-B (Short Answer Type Questions )
Answer any three of the following. 3x5= 15
2. a) What do you mean by Recursion ? Give example. 3
What are strings ? Explain with example. 2
b)
3. a)
Explain the difference between structure & union with examples. 4
b) What is Pointer ? 1
4. Using pointer write a program to find out length of the given
/ .
string without using strlen () function. 5
5. Write a program, to check whether a given string palindrome or not. 5
6' What do you mean by scope of a variable ? Explain the storage classes available in C. 2 + 3
GROUP-C ( Long Answer Type Questions )
Answer any three of the following. 3 x 15 = 45
7. What is structure ? How does a structure differ from any
array ? What do you mean by call by value and call by
reference ? Write a C program, which accepts an integer
numbers and prints the multiplication of the digits.
2+2+2+2+7
8. a) What do you mean by malloc ( ) and calloc ( ) ? Explain
their difference. 5
b) Using pointer write a function that will calculate maximum and minimum of a given set of numbers. 7
c) Write a recursive function that will calculate HCF of/two numbers. 3
CS/BCA/SEM-1 /BCA-103/2009-10
9. a) Explain strcat (), strcmp (), strrev (), strlen ()
b) Write C code to print
1 | |||
2 |
3 | ||
4 |
5 |
6 | |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
c) Write C code to print
ABCDEF EDCBA
abcde edcba
ABC C B A
A B B A
A A
r 2+6+7
10. a) What is a function ? 2
b) What do you mean by the following : 3
i) Function declaration
ii) Function calling (
iii) Function definition.
c) When is it necessary to declare prototype of a function ?
3
d) Write a> program to arrange a group of numbers into positive & negative numbers. 7
11. What is loop ? Discuss the different types of loops with syntax and appropriate examples. Write a program to print the summation of the following series :

/
11405 7
Attachment: |
Earning: Approval pending. |