0% found this document useful (0 votes)
368 views

solved questions matric 2024(theory)

Uploaded by

digitalbtr27
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
368 views

solved questions matric 2024(theory)

Uploaded by

digitalbtr27
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 8

Total No.

of Printed Pages – 7

Subject Code : 34 B24-CS (E) (Th)

2024

COMPUTER SCIENCE (E)


(Theory)

Full Marks : 70
Pass Marks : 21

Time : 3 hours

The figures in the margin indicate full marks for the questions
1. Choose the correct answer: 1x4=4
a) An access point is used to connect
i) Wirefull network
ii) Wireless network
iii) Other network
iv) All of the above
b) The_____section contains the information about the HTML document.
i) TITLE
ii) HEAD
iii) BODY
iv) HTML
c) The number of columns denotes the_____of the table.
i) Cardinality
ii) Degree
iii) Attribute
iv) Field
d) _____ displays only the important information by hiding the implementation part.
i) Inheritance
ii) Encapsulation
iii) Abstraction
iv) Polymorphism
2. Fill in the blanks: 1x4=4
a) MAC address is composed of 12 hexadecimal digit(s)( six groups of two hexadecimal digits)
b) CSS is a scripting language that is widely used to add functionality and interactivity to web pages.
c) In MySQL, data validation can be ensured through constraints while entering data in a table.
d) Encapsulation is the process of hiding unwanted data, such as restricting access to any member of an
object.
3. State whether the following statements are True or False: 1 x 4 = 4
a) An IP address is a unique identifier assigned to a network interface controller.False(MAC address)
b) OR operator requires that all the conditions to be true for inclusion in the result. False(any one of the
conditions)
c) The initialization expression contains the statements that need to be executed in each iteration of the
loop. True
d) A pointer can be used to point an integer only. False(can be used to point char and type at the same
time)
4. Answer the following questions in one word each: 1x8=8
a) This command is used to verify the connectivity between two computers. What is the command here?
Ans: ping

b) It is a numerical label that is assigned to network devices to identify them uniquely. What is it called?
Ans: IP address

c) It is the information to be displayed on the screen like text, pictures, audio, video etc. What is it called?
Ans: Content
d) This is a list of items, with a description of each item. What is it called?
Ans: Definition List

e) This attribute is used to define the address of the file to be linked. What is the attribute here?
Ans: href

f) It is an organized collection of structured information stored electronically in a computer system. What is


it called?
Ans: Database

g) It is the command used to display complete information about the fields defined in a table. What is the
command here?
Ans: DESCRIBE

h) It can be defined as a programming model which is based upon the concept of calling procedure. What is
it called?
Ans: Procedure Oriented Programming

5) Answer the following questions: 2 x 12 = 24


a) What is network protocol?
Ans: A network protocol is a set of rules that govern how devices on a network communicate and exchange
data and information. For example: SMTP, HTTP, FTP, HTTPS, TCP/IP, etc.

b) What is TCP?
Ans: The Transmission Control Protocol (TCP) is a communication protocol that is primarily used for
establishing communication between computers over a computer network.

c) What is HTML editor? What are its types?


Ans: HTML editor is a program that allows users to create and edit HTML code for web pages and other web
documents.
There are two main types of HTML editors:
i) WYSIWYG Editor: This editors allow the developer to see how the end results will look like.
Examples: Adobe Dreamweaver, Amaya and Google Web Designer.
ii) TEXT Editor: This editors are used for creating the HTML documents by typing the code.
Examples: Notepad or Wordpad.

d) What is LIKE operator in MySQL?


Ans: The LIKE operator in MySQL allows comparison of one string value with another string value. It uses
two wildcard characters:
i) % (percentage sign)-It allows finding a match for any string of any length, including zero
length. and
ii) _ (underscore sign)-It allows finding a match for any single character.

e) Explain list elements in HTML?


Ans: HTML supports three types of list: Ordered List, Unordered List and Definition List:
i) Ordered List: This type of list groups a set of related items in a specific numbered order.
For example;
 1,2,3….
 A,B,C…..
 a,b,c……
 I,II,III…..and
 i,ii,iii…..Here <OL> tag is used.
ii) Unordered List: This type of list groups a set of related items in no specific order in
bulleted form. For example Disc, Square and Circle. Here <UL> tag is used.
iii) Definition List: This type of list is used to define related terms. Here <DL>,<DT> and <DD>
tags are used.

f) What are the attributes of table tag?


Ans: The attributes of the table tag are: WIDTH, ALIGN, BORDER, BGCOLOR, CELLPADDING, CELLSPACING.

g) What is the use of BETWEEN clause in MySQL?


Ans: The BETWEEN clause is used to search the data within the range(specified lower and upper limit). It
includes both the lower and upper limit in the range. The query is:
SELECT *FROM studentdata WHERE TotalMarks BETWEEN 350 AND 450;

h) Why do we use arrays in computer program? Write the indices of the second and the last elements of
the following array declaration:
char city [8] = { ‘G’, U’, ‘W’, ‘A’, ‘H’, ‘A’, ‘T’,’ I’ }
Ans: Arrays are used in computer programs to store multiple values in a single variable, instead of declaring
separate variables for each value. For example, the marks of Computer Science of Class X students can
be stored in an array.
The index of the second element is 1 and its value(array element) is ‘U’ and the index of the
last element is 7 and its value(array element) is ‘I’.

i) What is user-defined function? Give an example.


Ans: The functions that are created/written by the programmer is called user-defined function. For example;
(calculate_interest( ), calculateAge( ), sum( ) etc. are user defined functions.

j) What is dynamic memory allocation?


Ans: The process of managing memory during a program’s runtime, rather than at compile time is called
Dynamic memory allocation.

k) What will be the output of the following program?


int i [ ] = { 3, 5, 9, 7 }
int * a = i;
printf(“%d”, * a);
a++;
printf(“%d”, * a);
++ * a;
printf(“%d”, * a);

Ans:
l) What is the difference between top-down and bottom-up approach in programming?
Ans: The difference between top-down and bottom-up approach in programming is as follows:

TOP-DOWN APPROACH BOTTOM-UP APPROACH


1) Starts with the big picture and breaks it down 1) Starts with the individual parts and builds
into smaller parts. them up into a larger system.
2) Top-down starts with high-level planning, 2) while bottom-up starts with task execution.
3) While problem solving Top-down approach 3) In problem solving the bottom-up approach
follows a recursive approach. is iterative.
4) Top-down is usually easier to implement, 4) But bottom-up can be optimized further for
time and space complexity.
5) Top-down is usually slower than bottom-up. 5) Bottom-up is usually faster than Top-down.

6) Answer the following questions:


a) What are the rules for naming a table in MySQL?
Ans: The following are the rules for naming a table in MySQL:
a) A table can have a maximum of 30 characters.
b) It can contain characters A-Z, a-z and numbers 0-9.
c) The table name should begin with an alphabet.
d) The special character_(underscore) is allowed. It is used for joining two words.
e) Reserved words are not allowed. For example, CREATE, SELECT, DROP etc.

b) Draw a flowchart for finding the total number of even numbers from a series of numbers.
Ans:

Start

Count = 0

No Is there
Declare Count more
number?

Yes Count = Count + 1

End Get the next number Yes

Is the number
even?
i.e. number
c) What is a global variable in C? Why do we need such a variable? % 2 = = 0?
Ans: In C programming, a global variable is a variable that is declared outside any function or block of code.
We need global variable, because it makes it accessible throughout the entire program and the
memory is allocated statically when the program starts.

7) Answer the following questions: 4 x 3 = 12


a) What is the use of <input> tag? Write the syntax of <input> tag. What are its attribute values?
Ans: The <input> tag is used to specify an input field where the user can enter data. The <input>
element is the most important form element. The <input> element can be displayed in several
ways, depending on the type attribute.
The syntax of <input> tag is as follows:
<input type = “value”……>
Some of the attribute values of the <input> tag are:
i) Text Name
ii) File Name
iii) Password Name
iv) Rows and Column numbers
v) Checkbox name
vi) Radio Name
vii) Submit Name
viii) Reset Name
ix) Button Name

b) Write a C program to print “I read in class X under SEBA” five times using loop.
Ans: USING FOR LOOP:

#include<stdio.h>
int main()
{
int i;
for(i=1; i<=5; i++)
{
printf("I read in Class X under SEBA:\n");
}
return 0;
}

USING WHILE LOOP:

#include<stdio.h>
int main()
{
int i;
while( i<5)
{
printf("I read in Class X under SEBA:\n");
i++;
}
return 0;
}

USING DO-WHILE LOOP

#include<stdio.h>
int main()
{
int i;
do
c) What are inner and outer loop? How can we terminate outer loop from a block of the inner loop?
Ans: The loop that is written inside another loop/first loop is called the inner loop. And the loop that
is written outside the inner loop/the first loop is called the outer loop.
Eg:
Loop 1
{
Loop 2
{
// Statements to be printed
}
}

In the above code, loop 2 is the inner loop, and loop 1 is the outer loop.

8. Answer the following questions:


a) Create a table ‘Coach’ in a database ‘Games’ with the following fields: 1

Column Name Data Type Size Constraints


CoachID INT PRIMARY KEY
CoachName VARCHAR 20 NOT NULL
Sports VARCHAR 15
DOJ DATE NOT NULL
Gender CHAR 1
Salary INT NOT NULL

Ans: CREATE TABLE Coach (


CoachID INT PRIMARY KEY,
CoachName VARCHAR (20) NOT NULL,
Sports VARCHAR (15),
DOJ DATE NOT NULL,
Gender CHAR (1),
Salary INT (NOT NULL
);
b) Add data into the table as follows: 1
CoachID CoachName Sports DOJ Gender Salary
1001 Mukund Gogoi Boxing 2004-09-01 M 40,000
1002 Arnab Duwara Karate 1999-01-01 M 56,000
1003 Nayan Bora Arm Wrestling 1995-03-29 M 60,000
1004 Devarsh Hazarika Basket ball 2005-02-28 M 35,000
1005 Chetna Sharma Swimming 2010-03-31 F 25,000
1006 Lakshmi Devi Boxing 2012-01-01 F 22,000

Ans: INSERT INTO Coach


VALUES (1001, ‘Mukund Gogoi’, ‘Boxing’, ‘2004-09-01’, ‘M’, 40000),
(1001, ‘Arnab Duwara’, ‘Karate’, ‘1999-01-01’, ‘M’, 56000),
(1002, ‘Nayan Bora’, ‘Arm Wrestling’, ‘1995-03-29’, ‘M’, 60000),
(1003, ‘Devarsh Hazarika’, ‘Basket ball’, ‘2005-02-28’, ‘M’, 35000),
(1004, ‘Chetna Sharma’, ‘Swimming’, ‘2010-03-31’, ‘F’, 25000),
(1005, ‘Lakshmi Devi’, ‘Boxing’, ‘2012-01-01’, ‘F’, 22000);

c) Write a query for the following (any three)


i) Display the maximum and minimum salaries of the coaches.
Ans: SELECT Salary FROM Coach;

ii) Display the number of male and female coaches.


Ans: SELECT Gender, COUNT(*) as ‘Count_Gender’ FROM Coach_tab GROUP BY
Gender;

iii) Display the details of all coaches having name ends with ‘i’.
Ans: SELECT * FROM Coach WHERE CoachName LIKE ‘%i’;

iv) Display the details of all coaches whose DOJ is in the range 1995-01-01 to 2005-01-01
Ans: SELECT * FROM Coach WHERE DOJ BETWEEN 1995-01-01 AND 2005-01-01

*******

You might also like