Sample Paper BCA -I Programming in C
Sample Paper BCA -I Programming in C
(Programming in C CSIT140)
BCA 1st Sem.
[Max Marks: 70]
Section A - Attempt any Two questions out of Four. Each question carries 7.50 marks. [15
Marks]
Question No: 1
Question No: 2
Explain the different looping concept in C programming and write the C Code for addition of
any 10 numbers.
Question No: 3
Explain the recursion concept with how it works? Write a C Code to find the factorial using
recursion.
Question No: 4
What is the difference between structure and union? Explain with example how to create the
structure and elements are accessed from structure for the student record.
Section B - Compulsory Questions. Each question carries 7.50 marks. [15 Marks]
What is the difference between static and dynamic memory location, explain with example?
Question No: 2
Define Pointer and how value is stored using pointer? Access the 10 array elements using
pointer.
Section C - Compulsory Questions. Each question carries 2.00 marks. [40 Marks]
Question No: 1
#include <stdio.h>
void main()
{
char *s = "hello";
char *p = s;
printf("%p\t%p", p, s);
}
Question No: 2
Question No: 3
Question No: 4
Question No: 5
How many number of pointer (*) does C have against a pointer variable declaration?
a) 7
b) 127
c) 255
d) No limits
Question No: 11
#include <stdio.h>
union Sti
{
int nu;
char m;
};
int main()
{
union Sti s;
printf("%d", sizeof(s));
return 0;
}
a) 8
b) 5
c) 9
d) 4
Question No: 14
What will be the final value of x in the following C code?
#include <stdio.h>
void main()
{
int x = 5 * 9 / 3 + 9;
}
a) 3.75
b) Depends on compiler
c) 24
d) 3
Question No: 15
a) In while loop 2
b) In while loop in while loop 3
c) In while loop 3
d) Infinite loop
Question No: 16
Question No: 17
What are the elements present in the array of the following C code?
int array[5] = {5};
a) 5, 5, 5, 5, 5
b) 5, 0, 0, 0, 0
c) 5, (garbage), (garbage), (garbage), (garbage)
d) (garbage), (garbage), (garbage), (garbage), 5
Question No: 18
What will be the output of the following C code?
#include <stdio.h>
void main()
{
int x = 1, y = 0, z = 5;
int a = x && y || z++;
printf("%d", z);
}
a) 6
b) 5
c) 0
d) Varies
Question No: 19
Question No: 20