CBSE UGC NET JULY 10 2016 PAPER 2 SOLVED WITH EXPLANATION PART-2


Pages: 1 2 3 4 5


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 is 3


12. the following satement 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 function returning pointers to intergers
  4. an illegal statement

answer is 4


13. which one of the following is correct, when a class grants friend status to another class?

  1. the member functions of the class generating friendship can access the members of the friend class
  2. all member funtions of the class granted friendship have unrestricted access to the members of the class granting the friendship
  3. class friendship is reciprocal to each other
  4. there is no such concept

answer is 2


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

  1. overloads
  2. friendship
  3. inherits
  4. overrides

answer is 4


15. what is the value returned by the function f given below when n= 100?

intf(int n)

{

if(n==0) then return n;

else

return n + f(n-2);

}

  1. 2550
  2. 2556
  3. 5220
  4. 5520

answer is 1

Explanation:

The given function is a recursive function which takes starting value as 100. It keeps on adding the present value and the value obtained by calling the function f(n-2) where n is current value. It stops at n=0 where it returns 0.

As a result, it forms an AP starting with first term as 2 and last term as 100 with 2 common difference and total terms as 50.

So applying Sum of AP, we get :-

S= (n*(a+l))/2 = (50*(2+100))/2 = 2550


16 In RDBMS,the constraint that no key attribute may be NULL is referred to as:

  1. Referential intergrity
  2. multi-valued intergrity
  3. entity intergrity
  4. functional intergrity

answer is 3


17 which of the following statements 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 thr 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.

  1. I and IV
  2. III and IV
  3. I,II and III
  4. II,III and IV only

answer is 2


18. In a 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 with NULL.
  2. to avoid confusion with actual legitimate data values like 0 for integers columns and ” ” 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”exists” for that particular tuple.

answer is 1


19. consider the followingtwo commands c1 and c2 on the relation R from an SQL database:

c1: drop table R;

c2: delete table from R;

whcih of the following statements is true?

I. both C1 and C2 delete the schema for R.

II. C2 reatins realtion R, but delete all tuples in R.

III. C1 deleted not only all tuples of R, but also the schema for R

  1. I only
  2. I and II
  3. II and III
  4. I,II and III

answer is 2


  1. consider the following database table having A,B,C,D as its four attributes and four possible candidate keys (I,II,III,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 stands for different values in the table (e.g.,d1 is definitely not eqqual 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 is 3


Pages: 1 2 3 4 5


 

Leave a comment