NET JUNE 2015 PAPER-2 SOLVED PART-2


Pages: 1 2 3 4 5


  1. What is the output of the following program ?

(Assume that the appropriate pre-processor directives are included and there is no syntax error)

main()

{

char S[ ] = “ABCDEFGH”;

printf (“%C”,* (& S[3]));UGC net study material

printf (“%s”, S+4);

printf (“%u”, S);

/* Base address of S is 1000 */ }

(A) ABCDEFGH1000 (B) CDEFGH1000

(C) DDEFGHH1000 (D) DEFGH1000

Answer: D

Explanation.
S[0]=A at address 1000.
S[1]=B at address 1001.
S[2]=C at address 1002.
S[3]=D. at address 1003.
S[4]=E. at address 1004.
S[5]=F
S[6]=G
S[7]=H.

printf(“%c”,*(&S[3])); prints character at subscript S[3].
printf(“%s”,S+4); prints from base address 1000+4.
printf(“%u”,S); prints base address.


  1. Which of the following, in C++, is inherited in a derived class from base class ?

(A) constructor (B) destructor

(C) data members (D) virtual methods

Answer: C


  1. Given that x=7.5, j=-1.0, n=1.0, m=2.0

the value of –x+j == x>n>=m is:

(A) 0 (B) 1UGC net study material

(C) 2 (D) 3

Answer: A

Explanation.

–(x)+-1.0==7.5>1>=2.
5.5==7.5>0 (as 1>=2 is false).
6.5==1.(as 7.5>0).
6.5==1 is false.


  1. Which of the following is incorrect in C++ ?

(A) When we write overloaded function we must code the function for each usage.

(B) When we write function template we code the function only once.

(C) It is difficult to debug macros

(D) Templates are more efficient than macros

Answer: D


  1. When the inheritance is private, the private methods in base class are……………… in the derived class (in C++).

(A) inaccessible (B) accessible

(C) protected (D) public

Answer: A


  1. An Assertion is a predicate expressing a condition we wish database to always satisfy. The correct syntax for Assertion is :

(A) CREATE ASSERTION ‘ASSERTION Name’ CHECK ‘Predicate’

(B) CREATE ASSERTION ‘ASSERTION NAME’

(C) CREATE ASSERTION, CHECK Predicate

(D) SELECT ASSERTION

Answer: A

Explanation.

  1. An assertion is a predicate expressing a condition we wish the database to always satisfy.
  2. Domain constraints, functional dependency and referential integrity are special forms of assertion.
  3. Where a constraint cannot be expressed in these forms, we use an assertion, e.g.
    • Ensuring the sum of loan amounts for each branch is less than the sum of allaccount balances at the branch.
    • Ensuring every loan customer keeps a minimum of $100 in an account.
  4. An assertion in DQL-92 takes the form,

  1. Which of the following concurrency protocol ensures both conflict serializability and freedom from deadlock ?

(a) 2-phase Locking

(b) Time stamp – orderingUGC net study material

(A) Both (a) and (b) (B) (a) only

(C) (b) only (D) Neither (a) nor (b)

Answer: C


  1. Drop Table cannot be used to drop a Table referenced by ……………… constraint.

(a) Primary key (b) Sub key (c) Super key (d) Foreign key

(A) (a) (B) (a), (b) and (c)

(C) (d) (D) (a) and (d)

Answer: C


  1. Database applications were built directly on top of file system to overcome the following drawbacks of using file-systems

(a) Data redundancy and inconsistency

(b) Difficulty in accessing Data

(c) Data isolation

(d) Integrity problems

(A) (a) (B) (a) and (d)

(C) (a), (b) and (c) (D) (a), (b), (c) and (d)

Answer: D


  1. For a weak entity set to be meaningful, it must be associated with another entity set in combination with some of their attribute values, is called as :

(A) Neighbour Set (B) Strong Entity Set

(C) Owner entity set (D) Weak Set

Answer: C


Pages: 1 2 3 4 5


Leave a comment