Pages

Wednesday, 3 August 2016

UGC Net Computer Science Paper II July 16 page 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
(1) -1
(2) 0
(3) 1
(4) 2
Answer : 3

12.  The following statement in C
Int (*f())[];
Declares
(1) a function returning a pointer to an array of integers
(2) a function returning an array  of pointers to integers
(3) array of functions returning  pointers of integers
(4) an illegal statement
Answer : 1


13.  which of the following is correct , when a class grants friend class status to another class
(1) The member function of the class generating friendship can access the member of the friend class.
(2) All member of functions of the class granted friendship have unrestricted access the member of the class.
(3) Class friendship is reciprocal to each other.
(4) There is no such concept
Answer : 2

14. When a method in a subclass has the same name and type signature as a method in the super class , then the method in the sub class _____ the method in the superclass
(1) Overloads
(2) Friendships
(3) Inherit
(4) Overrides
Answer : 4
15. What is the value returned by the function f given below when n=100?
(1) int f(int n)
{
If(n==0) then return n;
Else
Return n+f(n-2);
(1) 2550
(2)2556
(3) 5220
(4) 5520
Answer : 1

16. In RDBMS , the constraint that no key attribute (column) may be NULL is referred to as:
(1) Referential integrity
(2) Multi – value dependency
(3) Entity Integrity
(4) Functional Dependency
Answer : 3

17. Which of the following statement(s) is/are FALSE in the context of Relational DBMS?
(I) Views in the 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 concept.
(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
(1) I and IV only
(2) III and IV only
(3) I II and III only
(4) II,III and IV Only
Answer : 4

18. Ina relational database model , NULL values can be used for all but which one of the following?
(1) To allow duplicate tuples in the table by filling the primary key column(s) with NULL.
(2) To avoid confusion with actual legitimate data value  like 0 (zero) for integer column and ‘’ (the empty string) for string columns.
(3) To leave columns in a tuple marked as “unknown” when the actual value is unknown.
(4) To fill a column in a tuple when that column does not really “exist” for that particular tuple.
Answer : 1

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
(1) I only
(2) I and II only
(3) II and III only
(4) I,II, and III
Answer : 3

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 :

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?
(1) I and III only
(2) III and IV only
(3) II only
(4) I only
Answer : 3

Next Page 


No comments:

Post a Comment