Sub. Code: 4281
First Term Examination 2078(2021)
XII Science
Candidates are requested to give their answers in their own words as far as practicable. The figures in the margin indicate full marks.
Subject: Computer Science
Grade: XII Full Marks: 50
Time: 2 hrs
Grade: XII Full Marks: 50
Time: 2 hrs
Group 'A'
(Multiple Choice Questions)
Tick the best answer. [9×1=9]
(Multiple Choice Questions)
- Which is a user defined function?#include <stdio.h> main() { int i = 0; do { i++; printf("in while loop\n"); } while (i < 3); }
- 2
- 3
- 4
- 4
- What is the value of (a+b)+c?
- 0
- 10
- 100
- None of the above
- In a recursive function, we must return an int value for a function.
- True
- False
- O22 is ... integer constant.
- decimal
- octal
- hexadecimal
- None of the above
- To concatenate two strings, we have to use ... function.
- strlen()
- strcomp()
- strcat()
- strcmp()
- In the relational database model, the relations are generally termed as…
- Tuples
- Attributes
- Rows
- Tables
- Which is the object in DBMS?
- database
- table
- view
- a,b and c
- The term "SQL" stands for ...
- Standard Query Language
- Sequential Query Language
- Structured Query Language
- Server-side Query Language
- Foreign key must be unique.
- True
- False
- Explain any two components of a user defined function. [2.5+2.5]
OR Write a program to know if a number is Palindrome or not using a function. [Palindrome means the same number from both sides. E.g. 121] [5] - Explain about Hierarchical database model with an example. [1+4]
- Define structure.How do you initialize struct members? Give an example. [1+4]
OR Explain about local and global variables. [2.5+2.5] - Define the term DBMS.Explain its any three features. [2+3]
- Explain about the Relational database model with an example? [5]
- Write a program to find the sum of two matrices of order mxn using the function matrix_sum().[8]
#include<stdio.h> }OR Write a program to input any 10 employees’ name,designation and salary.Then print them in an appropriate format. [8] - Write DDL commands/SQL program to create the following table with fields.[4+4]
Group 'B'
Give short answer to the following questions. [5×5=25]
Group 'C'
Give long answer to the following questions. [2×8=16]
columns/fields | Data type | key |
---|---|---|
staff_id | int | primary |
staff_name | varchar(100) | |
staff_address | varchar(100) | |
staff_salary | float |
create table staff (
staff_id int primary key,
staff_name varchar(100),
staff_address varchar(100),
staff_salary float );
INSERT INTO staff (staff_id, staff_name,staff_address,staff_salary ) VALUES (101,"rajesh","ktm",456.56);
INSERT INTO staff (staff_id, staff_name,staff_address,staff_salary ) VALUES (102,"raghab","ktm",123.56);
INSERT INTO staff (staff_id, staff_name,staff_address,staff_salary ) VALUES (103,"rashil","ktm",1050.56);
INSERT INTO staff (staff_id, staff_name,staff_address,staff_salary ) VALUES (104,"rabin","ktm",789.56);
INSERT INTO staff (staff_id, staff_name,staff_address,staff_salary ) VALUES (101,"rajesh","ktm",456.56);
INSERT INTO staff (staff_id, staff_name,staff_address,staff_salary ) VALUES (102,"raghab","ktm",123.56);
INSERT INTO staff (staff_id, staff_name,staff_address,staff_salary ) VALUES (103,"rashil","ktm",1050.56);
INSERT INTO staff (staff_id, staff_name,staff_address,staff_salary ) VALUES (104,"rabin","ktm",789.56);