UGC Net Computer Science Paper II Dec 13 Page 2 Solved
11. The student marks should not be greater than 100. This is
(A) Integrity constraint
(B) Referential constraint
(C) Over-defined constraint
(D) Feasible constraint
Answer A
Explanation :-
Before one can start to implement the database tables, one must define the integrity constraints. Intergrity means something like 'be right' and consistent. The data in a database must be right and in good condition.
There are the domain integrity, the entity integrity, the referential integrity and the foreign key integrity constraints.
Domain Integrity
Domain integrity means the definition of a valid set of values for an attribute. You define
data type,
You may also define the default value, the range (values in between) and/or specific values for the attribute. Some DBMS allow you to define the output format and/or input mask for the attribute.
These definitions ensure that a specific attribute will have a right and proper value in the database.
12. GO BOTTOM and SKIP-3 commands are given one after another in a database file of 30
records. It shifts the control to
(A) 28th record
(B) 27th record
(C) 3rd record
(D) 4th record
Answer B
13. An ER Model includes I. An ER diagram portraying entity types.
II. Attributes for each entity type
III. Relationships among entity types.
IV. Semantic integrity constraints that reflects the business rules about data not captured in the
ER diagram.
(A) I, II, III & IV (B) I & IV
(C) I, II & IV (D) I & III
Answer A
14. Based on the cardinality ratio and participation ________ associated with a relationship type, choose either the Foreign Key Design, the Cross Referencing Design or Mutual Referencing Design.
(A) Entity
(B) Constraints
(C) Rules
(D) Keys
Answer B
15. Data Integrity control uses _______
(A) Upper and lower limits on numeric data.
(B) Passwords to prohibit unauthorised access to files.
(C) Data dictionary to keep the data
(D) Data dictionary to find last access of data
Answer B
16. What does the following declaration mean ?
int (*ptr) [10];
(A) ptr is an array of pointers of 10 integers.
(B) ptr is a pointer to an array of 10 integers.
(C) ptr is an array of 10 integers.
(D) none of the above.
Answer A
Explanation :-
int (*ptr)[10];
is a pointer to an array of 10 ints.
int *ptr[10];
is an array of 10 pointers.
Reason for segmentation
*ptr=a; printf("%d",*ptr[1]);
Here you are assigning the address of array a to ptr which would point to the element a[0]. This is equivalent to: *ptr=&a[0];
However, when you print, you access ptr[1] which is an uninitialized pointer which is undefined behaviour and thus giving segmentation
17. Which of the following has compilation error in C ?
(A) int n = 32 ;
(B) char ch = 65 ;
(C) float f = (float) 3.2 ;
(D) none of the above
Answer D
18. Which of the following operators can not be overloaded in C+ + ?
(A) ∗
(B) + =
(C) = =
(D) : :
Answer D
Explanation :-
Operators which cannot be overloaded[edit]
?: (conditional)
. (member selection)
.* (member selection with pointer-to-member)
:: (scope resolution)
sizeof (object size information)
typeid (object type information)
19. _________ allows to create classes which are derived from other classes,so that they automatically include some of its “parent’s” members, plus
its own members.
(A) Overloading
(B) Inheritance
(C) Polymorphism
(D) Encapsulation
Answer B
20. The correct way to round off a floating number x to an integer value is
(A) y = (int) (x + 0.5)
(B) y = int (x + 0.5)
(C) y = (int) x + 0.5
(D) y = (int) ((int)x + 0.5)
Answer A
No comments:
Post a Comment