BSC BSC Cs Semester 1 2019 November Problem Solving Using Computer and C Programming 2019 Pattern
BSC BSC Cs Semester 1 2019 November Problem Solving Using Computer and C Programming 2019 Pattern
14
[5623]-1001
:02
F.Y. B.Sc.
:28
COMPUTER SCIENCE
/20 1
09
/11 66
CS - 111 : Problem Solving Using Computer and ‘C’ Programming
19
1
(CBCS) (2019 Pattern) (Semester - I) (Paper - I)
01
AP
1) Q.1 is compulsory.
31
14
3) Questions 2 to 5 carry equal marks.
.14
:02
14
:28
Q1) Attempt any five of the following : [5 × 1 = 5]
/20 1
09
/11 66
19
a) While loop is entry controlled loop. State true or false.
1
.54 01
14
:02
e) Array is homogeneous data structure. Justify.
14
:28
61
f) Write a pseudocode to find out addition of first 20 numbers and print it.
09
16
19
/20
01
/11
[5623]-1001 1 P.T.O.
14
{
:02
int i = 1;
:28
while (i <= 13)
/20 1
09
{
/11 66
Printf(“%d\t”, i);
19
1
i = i + 2;
01
}
AP
}
06
[1 × 4 = 4]
31
2.1
14
.14
:02
Q3) a) Attempt any two of the following : [2 × 3 = 6]
14
:28
/20 1
ii) Explain following operators 09
/11 66
2) Relational.
.54 01
main( )
06
{
.14 CA
int x, y, answer;
31
x = 10;
2.1
y = 20; 14
:02
:28
printf(“%d”, answer);
61
09
}
16
19
{
/11
AP
int temp;
06
temp = 10 + a * b;
.54
CA
return temp;
31
}
2.1
b) Write a C program to accept ‘n’ numbers into array and find out maximum
.14
[5623]-1001 2
14
ii) Explain the use of break and continue.
:02
iii) What is output of following C code? Justify.
:28
main( )
/20 1
09
/11 66
{
19
int a[5] = {5, 1, 15, 20, 25};
1
01
int i, j, m;
AP
i = ++a[1];
06
j = a[1]++;
.54
CA
m = a[i++];
31
2.1
14
.14
:02
14
:28
b) Write a C program to find out factorial of a number using user defined
function.
/20 1
[1 × 4 = 4]
09
/11 66
19
1
number.
2.1
14
:02
14
:28
61
09
16
19
/20
01
/11
AP
06
.54
CA
31
2.1
.14
14
[5623]-1001 3