PREVIOUS YEAR SOLVED PAPERS - December 2015 Paper 2

Avatto > > UGC NET COMPUTER SCIENCE > > PREVIOUS YEAR SOLVED PAPERS > > December 2015 Paper 2

11. Consider the following program:
#include
main()
{
int i, inp;
float x, term=1, sum=0;
scanf("%d %f",&inp, &x);
for(i=1;i<=inp;i++)
{
term=term*x/i;
sum=sum+term;
}
printf(“Result=%f\n”,sum);
}
The program computes the sum of which of the following series?

  • Option : B
  • Explanation : Fro i=1: term = term * x / i = 1 * x / 1 = x. sum = sum + term = x. For i = 2: term = x * x / 2 = x2 / 2. sum = x + x2 / 2. For i = 3: term = x2 / 2 * x / 3 = x3 / 3! . sum = x + x2 / 2 + x3 / 3!. and so on... So, option (B) is correct.
Cancel reply

Your email address will not be published. Required fields are marked *


Cancel reply

Your email address will not be published. Required fields are marked *


12. Consider the following two statements:
(a) A publicly derived class is a subtype of its base class.
(b) Inheritance provides for code reuse.
Which of the following statements is correct?

  • Option : A
  • Explanation :
  • A publicly derived class is a subtype of its base class.
  • Inheritance provides for code reuse.
  • So, option (A) is correct.
Cancel reply

Your email address will not be published. Required fields are marked *


Cancel reply

Your email address will not be published. Required fields are marked *


13. Consider a “CUSTOMERS” database table having a column “CITY” filled with all the names of Indian cities (in capital letters). The SQL statement that finds all cities that have “GAR” somewhere in its name, is:

Cancel reply

Your email address will not be published. Required fields are marked *


Cancel reply

Your email address will not be published. Required fields are marked *


14. Match the following database terms to their functions:

List I                                  List II
  (a) Normalization(i) Enforces match of primary key to foreign key
  (b) Data Dictionary(ii) Reduces data redundancy in a databae
  (c) Referential Integrity(iii) Define view(s) of the database for particular user(s)
  (d) External Schema(iv) Contains metadata describing database structure.

      (a)  (b)  (c)  (d)
(A) (iv) (iii) (i) (ii)
(B) (ii) (iv) (i) (iii)
(C) (ii) (iv) (i) (iii)
(D) (iv) (iii) (ii) (i)

  • Option : B
  • Explanation :
    • Normalization reduces data redundancy in a database
    • Data Dictionary contains metadata describing database structuredefines view(s) of the database for particular user(s)
    • Referential Integrity enforces match of primary key to foreign key
    • External Schema defines view(s) of the database for particular user(s)

    So, option (B) is correct.
Cancel reply

Your email address will not be published. Required fields are marked *


Cancel reply

Your email address will not be published. Required fields are marked *


15. In general, in a recursive and non-recursive implementation of a problem (program) :

  • Option : B
  • Explanation : In general, in a recursive and non-recursive implementation of a problem (program) both time and space complexities are better in non-recursive than in recursive program. In some program recursive implementation gives worst case scenario too. So, recursive implementation does not guarantee for best case all the time. So, optipon (B) is correct.
Cancel reply

Your email address will not be published. Required fields are marked *


Cancel reply

Your email address will not be published. Required fields are marked *


Related Quiz.
December 2015 Paper 2