CBSE UGC NET Computer Science Paper II Solved July 2016 - Part 2

11.       Given i=0, j=1, k=-1
x=0.5, y=0.0
What is the output of the following expression in C language?
x * y < i + j || k
(A) -1      (B) 0
(C) 1       (D) 2
Answer: C
12.       The following statement in ‘C’
int(*f())[];
declares
(A) a function returning a pointer to an array of integers.
(B) a function returning an array of pointers to integers.
(C) array of functions returning pointers to integers.
(D) an illegal statement.
Answer: A
13.       Which one of the following is correct, when a class grants friend status to another class?
(A) The member functions of the class generating friendship can access the members of the friend class.
(B) All member functions of the class granted friendship have unrestricted access to the members of the class granting the friendship.
(C) Class friendship is reciprocal to each other
(D) There is no such concept.
Answer: B
14.       When a method in a subclass has the same name and type signatures as a method in the superclass, then the method in the subclass .................. the method in the superclass.
(A) Overloads               (B) Friendships
(C) Inherits                    (D) Overrides
Answer: D
15.       What is the value returned by the function f given below when n = 100 ?
int f(int n)
    { if (n==0) then return n;
    else
    return n + f(n-2);
    }
(A) 2550                        (B) 2556
(C) 5220                        (D) 5520
Answer: A

16.       In RDBMS, the constraint that no key attribute (column) may be NULL is referred to as:
(A) Referential integrity          (B) Multi-valued dependency
(C) Entity Integrity                    (D) Functional dependency
Answer: C
17.       Which of the following statement(s) is/are FALSE in the context of Relational DBMS ?
I. Views in a database system are important because they help with access control by allowing users to see only a particular subset of the data in the database.
II. E-R diagrams are useful to logically model concepts.
III. An update anomaly is when it is not possible to store information unless some other, unrelated information is stored as well.
IV. SQL is a procedural language.
(A) I and IV only           (B) III and IV only
(C) I, II and III only       (D) II, III and IV only
Answer: D
18.       In a relational database model, NULL values can be used for all but which one of the following?
(A) To allow duplicate tuples in the table by filling the primary key column(s) with NULL.
(B) To avoid confusion with actual legitimate data values like 0 (zero) for integer columns and ‘’ (the empty string) for string columns.
(C) To leave columns in a tuple marked as “unknown” when the actual value is unknown.
(D) To fill a column in a tuple when that column does not really “exist” for that particular tuple.
Answer: A
19.       Consider the following two commands C1 and C2 on the relation R from an SQL database:
C1: drop table R;
C2: delete from R;
Which of the following statements is TRUE?
I. Both C1 and C2 delete the schema for R.
II. C2 retains relation R, but deletes all tuples in R.
III. C1 deletes not only all tuples of R, but also the schema for R.
(A) I only                        (B) I and II only
(C) II and III only          (D) I, II and III
Answer: C
20.    Consider the following database table having A, B, C and D as its four attributes and four possible candidate keys (I, II, III and IV) for this table:
A
B
C
D
a1
b1
c1
d1
a2
b3
c3
d1
a1
b2
c1
d2
I: {B}       II: {B, C}          III: {A, D}         IV: {C, D}
If different symbols stand for different values in the table (e.g., d1 is definitely not equal to d2), then which of the above could not be the candidate key for the database table?
(A) I and III only            (B) III and IV only
(C) II only                      (D) I only
Answer: C

Pages   2   3   4   5 

Post a Comment

0 Comments