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
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 means the definition of a valid set of values for an attribute. You define
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
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
(A) I, II, III & IV (B) I & IV
(C) I, II & IV (D) I & III
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.
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
16. What does the following declaration mean ?
int (*ptr) ;
(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.
is a pointer to an array of 10 ints.
is an array of 10 pointers.
Reason for segmentation
Here you are assigning the address of array a to ptr which would point to the element a. This is equivalent to: *ptr=&a;
However, when you print, you access ptr 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
18. Which of the following operators can not be overloaded in C+ + ?
(B) + =
(C) = =
(D) : :
Operators which cannot be overloaded
. (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.
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)