(XII) Computer First Term Exam 2078 - Management

Sub. Code: 4281

TRINITY INTERNATIONAL SS & COLLEGE
First Term Examination 2078(2021)
XII Management

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?
    1. scanf("%d",&a);
    2. printf("%d",result);
    3. strlen();
    4. void sum_series();
  2. In the function void sum(), total number of parameters are...
    1. 1
    2. 0
    3. 2
    4. All of the above
  3. In a recursive function, we must return an int value for a function.
    1. True
    2. False
  4. If we write
    int a[3][2]={1,2,3,4,5,6};
    The value of a[2][0] is
    1. 2
    2. 3
    3. 5
    4. 4
  5. To convert string into lowercase we have to use...
    1. strlwr()
    2. strcomp()
    3. strcat()
    4. strupr()
  6. Data are stored in the form tree like structure, in ...
    1. Network database model
    2. Hierarchical database model
    3. Attributes database model
    4. a,b and c
  7. Which is the command used to create a database in SQL?
    1. create database
    2. create
    3. start
    4. None of the above
  8. The term "SQL" stands for ...
    1. Standard Query Language
    2. Sequential Query Language
    3. Structured Query Language
    4. Server-side Query Language
  9. Primary key does not support ...
    1. Null value
    2. Duplicate value
    3. Both a and b
    4. None of the above
    Group 'B'
    Give short answer to the following questions. [5×5=25]
  10. Define user defined function. Explain about function prototype and function body part with supporting example. [1+2+2]
    OR
    Write a program to know a number is positive or negative or zero using function number_test().[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 count total digits present in a string using the function total_digits(). [8]
    #include<stdio.h> int total_digits(char str[]); main() { int c; char str[30]; printf("Enter any string: "); scanf("%s",str); c=total_digits(str); printf("Total digits=%d",c); } int total_digits(char str[]) { int i,a=0; for(i=0;str[i]!='\0';i++) { if(str[i]>='0'&&str[i]<='9') a++; } return(a); }
    OR
    What is normalization? Explain about 1N and 2N with example. [2+6]
  17. Write a program to input the teacher's name and subject . Then print the name of those teachers who teach the subject account.
    [use struct concept and enter data for any 10 teachers] [8]
  18. #include<stdio.h> #include<string.h> struct student { char t_name[30]; char subject[30]; }s[10]; main() { int i; for(i=0;i<10;i++) { printf("Enter num[%d] teacher name and subject : ",i+1); scanf("%s%s",s[i].t_name,s[i].subject); strlwr(s[i].subject); } printf("Name of Account Teacher :\n"); for(i=0;i<10;i++) { if(strcmp(s[i].subject,"account")==0) printf("%s\n",s[i].t_name); } }
The End