(XII) C.Sc. 1st Term 2078 Science

Sub. Code: 4281

TRINITY INTERNATIONAL SS & COLLEGE
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


Group 'A'
(Multiple Choice Questions)
Tick the best answer. [9×1=9]
  1. Which is a user defined function?
    #include <stdio.h> main() { int i = 0; do { i++; printf("in while loop\n"); } while (i < 3); }
    1. 2
    2. 3
    3. 4
    4. 4
  2. What is the value of (a+b)+c?
    1. 0
    2. 10
    3. 100
    4. None of the above
  3. In a recursive function, we must return an int value for a function.
    1. True
    2. False
  4. O22 is ... integer constant.
    1. decimal
    2. octal
    3. hexadecimal
    4. None of the above
  5. To concatenate two strings, we have to use ... function.
    1. strlen()
    2. strcomp()
    3. strcat()
    4. strcmp()
  6. In the relational database model, the relations are generally termed as…
    1. Tuples
    2. Attributes
    3. Rows
    4. Tables
  7. Which is the object in DBMS?
    1. database
    2. table
    3. view
    4. a,b and c
  8. The term "SQL" stands for ...
    1. Standard Query Language
    2. Sequential Query Language
    3. Structured Query Language
    4. Server-side Query Language
  9. Foreign key must be unique.
    1. True
    2. False
    Group 'B'
    Give short answer to the following questions. [5×5=25]
  10. 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]
  11. Explain about Hierarchical database model with an example. [1+4]
  12. Define structure.How do you initialize struct members? Give an example. [1+4]
    OR
    Explain about local and global variables. [2.5+2.5]
  13. Define the term DBMS.Explain its any three features. [2+3]
  14. Explain about the Relational database model with an example? [5]
  15. Group 'C'
    Give long answer to the following questions. [2×8=16]
  16. 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]
  17. Write DDL commands/SQL program to create the following table with fields.[4+4]
  18. columns/fieldsData typekey
    staff_idint primary
    staff_namevarchar(100)
    staff_addressvarchar(100)
    staff_salary float
    Then insert any four records using SQL commands.
    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);
The End