11. Consider
the following program:
#include<stdio.h>
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?
(A) x+x2/2+x3/3+x4/4+... (B) x+x2/2!+x3/3!+x4/4!+...
(C) 1+x2/2+x3/3+x4/4+...
(D) 1+x2/2!+x3/3!+x4/4!+...
Answer:
B
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?
(A) Both the
statements (a) and (b) are correct
(B) Neither
of the statements (a) and (b) are correct
(C) Statement
(a) is correct and (b) is incorrect
(D) Statement
(a) is incorrect and (b) is correct
Answer:
A
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:
(A) Select
*from customers where city=’%GAR%’;
(B) Select
*from customers where city=’$GAR$’;
(C) Select
*from customers where city like ‘%GAR%’;
(D) Select
*from customers where city as ’%GAR’;
Answer:
C
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 database
(c)
Referential Integrity (iii)
Define view(s) of the database for particular user(s).
(d) External
Schema (iv) Contains
metadata describing database structure.
Codes:
(a)
(b) (c)
(d)
(A)
(iv) (iii) (i)
(ii)
(B)
(ii) (iv)
(i) (iii)
(C)
(ii) (iv) (iii)
(i)
(D)
(iv) (iii) (ii) (i)
Answer:
B
15. In
general, in a recursive and non-recursive implementation of a problem
(program):
(A) Both
time and space complexities are better in recursive than in non-recursive
program
(B) Both
time and space complexities are better in non-recursive than in recursive
program
(C) Time
complexity is better in recursive version but space complexity is better in
non-recursive version of the program
(D) Space
complexity is better in recursive version but time complexity is better in
non-recursive version of the program
Answer: B
16. A
three dimensional array in ‘C’ is declared as int A[x][y][z]. Here, the address
of an item at the location A[p][q][r] can be computed as follows (where w is
the word length of an integer):
(A) &A[0][0][0]+w(y*z*q+z*p+r)
(B) &A[0][0][0]+w(y*z*p+z*q+r)
(C) &A[0][0][0]+w(x*y*p+z*q+r)
(D) &A[0][0][0]+w(x*y*q+z*p+r)
Answer:
B
17. In
C++, which system-provided function is called when no handler is provided to
deal with an exception?
(A) terminate() (B) unexpected()
(C) abort() (D) kill()
Answer:
A
18. Which
of the following provides the best description of an entity type?
(A) A
specific concrete object with a defined set of processes (e.g. Jatin with
diabetes)
(B) A value
given to a particular attribute (e.g. height-230 cm)
(C) A thing
that we wish to collect data about zero or more, possibly real world examples
of it may exist.
(D) A
template for a group of things with the same set of characteristics that may
exist in the real world
Answer:
D
19. Data
which improves the performance and accessibility of the database are called:
(A) Indexes (B) User Data
(C) Application
Metadata (D) Data Dictionary
Answer:
A
20. A
relation R={A,B,C,D,E,F,G} is given with following set of functional
dependencies:
F={AD→E,
BE→F, B→C, AF→G}
Which of the
following is a candidate key?
(A) A (B) AB
(C) ABC (D) ABD
Answer:
D
1 Comments
please check 15 question. i think d should be the answer. m confused
ReplyDelete