Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 5

ROLL NO.

S.S.S. SAMITI’s
S.A.M. D. Higher Secondary School of
Science, Kavale, Ponda – Goa

1st FORMATIVE TEST AUGUST 2023

Sub:- COMPUTER SCIENCE

SUBJECT CODE:- 4705

Date: 11/08/2023 Time : 60 MINS.

Std: XII Science Max. Marks: 20

Total No. of Questions:- 11 No. of Printed Pages: 05

INSTRUCTIONS:

⮚ All questions are compulsory

⮚ State your assumptions clearly wherever

required.

⮚ MCQs are to be attempted only once.

SSSHSSK/XII/CS/1stFT/AUG 2023 1|Page


1] Write the correct alternative from those
(1)
given below:
Which of the following is NOT a valid
rule of Boolean Algebra?
● A+ A = A ● A.A=A
● A. =0
A ● A+ A =1

2] Write the correct alternative from those (1)


given below:
The value of float y =1/2*5+7.5; is _____
● 10.0 ● 7.5
● 7.6 ● 9.5

3] State the duality Principle. (1)

4] Draw a logical circuit diagram for the (1)


following Boolean expression:
A.(B+C )

5] Write an overloaded function called (2)


PERIMETER() to compute and return the
perimeter of the following geometrical
figures:
i) square
ii) triangle
iii) rectangle

SSSHSSK/XII/CS/1stFT/AUG 2023 2|Page


iv) pentagon

6] Determine the output of the following C+ (2)


+ program:
#include<iostream>
using namespace std;

int a=30;
void fun(int &x, int y, int &z)
{
x+=a/2;
z-=y;
a-=5;
y+=a-z;
}
int main()
{
int a=2,b=3,c=4;
fun(a,b,c);
cout<<endl<<a<<","<<b<<","<<c<<","<<::a;
fun(b,c,a);
cout<<endl<<a<<","<<b<<","<<c<<","<<::a;

}
7] A Boolean function F defined on three (2)
input variables X,Y,Z gives an output 1 if
and only if there are odd number of 1’s in
the input. Draw the truth table for the
above function and express it in canonical
SOP form.

SSSHSSK/XII/CS/1stFT/AUG 2023 3|Page


8] Using the laws of Boolean Algebra, Prove (2)
that [ A B (C + BD )+ A B ] . C=B . C
9] What is an inline function? What are the (2)
two ways of making a function inline?
Write an inline function which accepts an
integer (n) and returns its square (n2).
10] Simplify the following Boolean function (3)
using K-map:
F(A,B,C,D) = (0,1,2,4,5,6,8,9,12,13,14)
Also draw the logic circuit diagram for the
simplified expression using NAND gates
only.
11] Write a function in C++ called ISNEON() (3)
which accepts a number of type integer as
argument, checks if the number is a Neon
number or not and returns 1 if Neon
number and zero otherwise.
Note: if the sum of the digits of the square
of a number is equal to the same number,
then the number is called a Neon number.
For example,
9 is a Neon number since 92 = 81
And sum of digits of 81 = 8+1=9

SSSHSSK/XII/CS/1stFT/AUG 2023 4|Page


OR
11] Write a function in C++ called (3)
CALFIBO() which accepts an integer N as
argument, computes the sum all even
terms and product of all odd terms
encountered in the first N terms of the
Fibonacci series except zero.
For example,
If N=10 then
First 10 terms of Fibonacci series are
0,1,1,2,3,5,8,13,21,34
So sum = 0+2+8+34 = 44 and
Product = 1x1x3x5x13x21 = 4095

🟔🟔🟔🟔🟔🟔🟔🟔🟔🟔🟔🟔🟔🟔

SSSHSSK/XII/CS/1stFT/AUG 2023 5|Page

You might also like