what will be output of following C Program? x=2+8%2
- 4
- 5
- 6
- Error
- option3
Clear All
/ highet precedence as compare to +. So / will evaluate first.
2+8%2 equivalent to 2+(8%2) = 2+4 =6.
Loading...
In conservative two-phase locking protocol, a transaction:
- Should release all the locks only at beginning of transaction
- Should acquire all the exclusive locks at beginning of transaction
- Should release exclusive locks only after the commit operation
- Should acquire all the locks at beginning of transaction
- option4
Clear All
Loading...
Assume a schedule having three transaction T1, T2, T3 with 3, 2 and 2 operation respectively. The number of schedules which are concurrent but not serial is.
- 12
- 210
- 206
- 204
- option4
Clear All
Total Schedule = (n1+n2+...nk)!/(n1!*n2!... *nk!l
Total Schedule = (3+2+2)!/(3!*2!*2!)
=7!/24 = 210.
Serial Schedule = (total no. Of transaction)! = 3! = 6
Total non-serial schedule = Total Schedule - Serial Schedule
Total non-serial schedule = 210-6 =
Loading...
Assume a schedule having three transaction T1, T2 with 4 and 2 operation respectively. The number of schedules which are concurrent but not serial is.
- 13
- 14
- 6
- 8
- option1
Clear All
Total Schedule = (n1+n2+...nk)!/(n1!*n2!... *nk!)
Total Schedule = (4 + 2)!/(4!*2!)
=6!/48 = 48
Serial Schedule = (total no. Of transaction)! = 2! = 2
Total non-serial schedule = Total Schedule - Serial Schedule
Total non-serial schedule = 15-2 = 13
Loading...
Given the basic ER and relational models, which of the following is INCORRECT?
- An attribute of an entity can have more than one value
- An attribute of an entity can be composite
- In a row of a relational table, an attribute can have more than one value
- In a row of a relational table, an attribute can have exactly one value or a NULL value
- option3
Clear All
The term ‘entity’ belongs to ER model and the term ‘relational table’ belongs to relational model.
A and B both are true.
Loading...
Given a hash table T with slot 50 that stores 2000 elements, the load factor α for T is
- 50
- 40
- 0.025
- 100000
- option2
Clear All
Formula for find Load Factor(α) = (Total No. of elements) / (No. of slots)
= 2000/50 = 40
Loading...