In a queue, the initial values of front pointer f rare pointer r should be ….. and …….. respectively. A) 0 and 1
B) 0 and -1
C) -1 and 0
D) 1 and 0

1 Answer

Answer :

B) 0 and -1

Related questions

Description : If the queue is implemented with a linked list, keeping track of a front pointer and a rear pointer, which of these pointers will change during an insertion into a non-empty queue? (A) Neither of ... (B) Only front pointer changes (C) Only rear pointer changes (D) Both of the pointers changes

Last Answer : (C) Only rear pointer changes

Description : There are three processes P1, P2 and P3 sharing a semaphore for synchronising a variable. Initial value of semaphore is one. Assume that negative value of semaphore tells us how many processes are waiting in queue. Processes access ... The final value of semaphore will be: (1) 0 (2) 1 (3) -1 (4) -2 

Last Answer : Answer: 1

Description : Consider a disk queue with request for input/output to block on cylinders  98, 183, 37, 122, 14, 124, 65, 67  in that order. Assume that disk head is initially positioned at cylinder 53 and moving ... and 252 cylinders (B) 640 and 236 cylinders (C) 235 and 640 cylinders (D) 235 and 252 cylinders

Last Answer : Answer: 236 and 208 cylinders Explanation: SSTF Initial head position =53 The closest queue to initial head position=65 head moves from 53 to 65=12 head moves from 65 to 67=2 head moves from 67 ... 122=24 head moves from 122 to 124=2 head moves from 124 to 183=59 Total head movement=208 

Description : Consider three CPU intensive processes P1, P2, P3 which require 20, 10 and 30 units of time, arrive at times 1, 3 and 7 respectively. Suppose operating system is implementing Shortest Remaining Time first (preemptive scheduling) ... end of Ready queue are not counted). (A) 3 (B) 2 (C) 4 (D) 5

Last Answer : (A) 3

Description : Five jobs A, B, C, D and E are waiting in Ready Queue. Their expected runtimes are 9, 6, 3, 5 and x respectively. All jobs entered in Ready queue at time zero. They must run in ............. order to minimize average response time if 3 < ... , C (B) C, E, D, B, A (C) E, D, C, B, A (D) C, B, A, E, D

Last Answer : (B) C, E, D, B, A

Description : Given a Non-deterministic Finite Automation (NFA) with states p and r as initial and final states respectively transition table as given below  The minimum number of states required in Deterministic Finite Automation (DFA) equivalent to NFA is (A) 5 (B) 4 (C) 3 (D) 2

Last Answer : (C) 3 

Description : The seven elements A, B, C, D, E, F and G are pushed onto a stack in reverse order, i.e., starting from G. The stack is popped five times and each element is inserted into a queue. Two elements are deleted from the queue and pushed ... The popped item is ................... (1) A (2) B (3) F (4) G

Last Answer : Answer: 2

Description : Consider an implementation of unsorted single linked list. Suppose it has its representation with a head and a tail pointer (i.e. pointers to the first and last nodes of the linked list). Given the ... the front node of the linked list. (D) Deletion of the last node of the linked list.

Last Answer : (D) Deletion of the last node of the linked list. 

Description : In a circular queue the value of r will be .. A) r=r+1 B) r=(r+1)% [QUEUE_SIZE – 1] C) r=(r+1)% QUEUE_SIZE D) r=(r-1)% QUEUE_SIZE

Last Answer : C) r=(r+1)% QUEUE_SIZE

Description : Consider a program that consists of 8 pages (from 0 to 7) and we have 4 page frames in the physical memory for the pages. The page reference string is :  1 2 3 2 5 6 3 4 6 3 7 3 1 5 3 6 3 4 2 4 3 4 5 ... to fill available page frames with pages): (A) 9 and 6 (B) 10 and 7 (C) 9 and 7 (D) 10 and 6

Last Answer : (B) 10 and 7

Description : The number of function points of a proposed system is calculated as 500. Suppose that the system is planned to be developed in Java and the LOC/FP ratio of Java is 50. Estimate the effort (E) required to ... ) 25 person months (B) 75 person months (C) 62.5 person months (D) 72.5 person months

Last Answer : (C) 62.5 person months 

Description : What are the final values of Q1 and Q0 after 4 clock cycles, if initial values are 00 in the sequential circuit shown below: (A) 11 (B) 10 (C) 01 (D) 00

Last Answer : (D) 00

Description : When subroutine is called contents of program counter is location address of __ instruction following call instruction is stored on _ __and program execution is transferred to __ address. a. Non ... , Stack and Main program Cc. Executable, Queue and Subroutine d. Executable, Stack and Subroutine

Last Answer : d. Executable, Stack and Subroutine

Description : The processor uses the stack to keep track of where the items are stored on it this by using the: a. Stack pointer register b. Queue pointer register c. Both a & b d. None of these

Last Answer : a. Stack pointer register

Description : The subprogram finish the return instruction recovers the return address from the: a. Queue b. Stack c. Program counter d. Pointer

Last Answer : b. Stack

Description : Suppose the function y and a fuzzy integer number around -4 for x are given as y=(x-3)2+2 Around -4={(2,0.3), (3,0.6), (4,1), (5,0.6), (6,0.3)} respectively. Then f(Around - 4) is given by: (A) {(2,0.6), (3,0.3), ... 6), (3,1), (6,0.6), (11,0.3)} (D) {(2,0.6), (3,0.3), (6,0.6), (11,0.3)}

Last Answer : (C) {(2,0.6), (3,1), (6,0.6), (11,0.3)}

Description : What is a queue? Give a real life example.

Last Answer : A: It is a linear data structure which follows the FIFO (First In First out) pattern. Real life example: Queue at the ticket counter

Description : The …………….. policy segments the disks request queue into sub queues of the length N. A) SCAN B) C-SCAN C) N-Step SCAN D) FSCAN

Last Answer : C) N-Step SCAN

Description : ……… is not the operation that can be performed on queue. A) Insertion B) Deletion C) Retrieval D) Traversal

Last Answer : D) Traversal

Description : Which of the following is not the type of queue? A) Ordinary queue B) Single ended queue C) Circular queue D) Priority queue

Last Answer : B) Single ended queue

Description : ………… is very useful in situation when data have to stored and then retrieved in reverse order. A) Stack B) Queue C) List D) Link list

Last Answer : A) Stack

Description : ……………. Is a pile in which items are added at one end and removed from the other. A) Stack B) Queue C) List D) None of the above

Last Answer : B) Queue

Description : Assuming that the disk head is located initially at 32, find the number of disk moves required with FCFS if the disk queue of I/O block requests are 98, 37, 14, 124, 65, 67: (A) 310 (B) 324 (C) 320 (D) 321

Last Answer : (D) 321

Description : Consider the following statements for priority queue: S1: It is a data structure in which the intrinsic ordering of the elements does determine the result of its basic operations. S2: The elements of a priority queue ... . (C) SI is incorrect and S2 is correct. (D) Both S1 and S2 are correct.

Last Answer : (D) Both S1 and S2 are correct.

Description : Which of the following statements is not true for Multi Level Feedback Queue processor scheduling algorithm? (A) Queues have different priorities. (B) Each queue may have different scheduling algorithm (C) ... to a queue (D) This algorithm can be configured to match a specific system under design

Last Answer : (C) Processes are permanently assigned to a queue

Description : If the Disk head is located initially at track 32, find the number of disk moves required with FCFS scheduling criteria if the disk queue of I/O blocks requests are: 98, 37, 14, 124, 65, 67 (A) 320 (B) 322 (C) 321 (D) 319

Last Answer : (C) 321

Description : Consider the following statements : S1: A queue can be implemented using two stacks. S2: A stack can be implemented using two queues. Which of the following is correct ? (A) S1 is correct and S2 is not correct. ( ... S2 is correct. (C) Both S1 and S2 are correct. (D) Both S1 and S2 are not correct.

Last Answer : (C) Both S1 and S2 are correct.

Description : Consider a disk queue with I/O requests on the following cylinders in their arriving order: 6,10,12,54,97,73,128,15,44,110,34,45 The disk head is assumed to be at cylinder 23 and moving in the direction ... . The disk head movement using SCAN-scheduling algorithm is: (1) 172 (2) 173 (3) 227 (4) 228

Last Answer : (2) 173

Description : If f(x, y) is a digital image, then x, y and amplitude values of f are (A) Finite (B) Infinite (C) Neither finite nor infinite (D) None of the above

Last Answer : (A) Finite

Description : Given the symbols A, B, C, D, E, F, G and H with the probabilities 1/30, 1/30, 1/30, 2/30, 3/30, 5/30, 5/30 and 12/30 respectively. The average Huffman code size in bits per symbol is: (A) 67/30 (B) 70/34 (C) 76/30 (D) 78/30

Last Answer : (C) 76/30

Description : For a database relation R(a, b, c, d) where the domains of a, b, c, d include only the atomic values. The functional dependency a → c, b → d holds in the following relation (A) In 1NF not in 2NF (B) In 2NF not in 3NF (C) In 3NF (D) In 1NF

Last Answer : (A) In 1NF not in 2NF 

Description : Consider the following Entity-Relationship (E-R) diagram and three possible relationship sets (I, II and III) for this E-R diagram: If different symbols stand for different values (e.g., t1 is definitely not equal to t2 ... diagram ? (A) I only (B) I and II only (C) II only (D) I, II and III

Last Answer : (A) I only

Description : For a database relation R(A,B,C,D) where the domains of A,B,C and D include only atomic values, only the following functional dependencies and those that can be inferred from them are: A→C B→D The ... form but not in third normal form (4) Both in second normal form as well as in third normal form

Last Answer : First normal form but not in second normal form

Description : Suppose ORACLE relation R(A, B) currently has tuples {(1, 2), (1, 3), (3, 4)} and relation S(B, C) currently has {(2, 5), (4, 6), (7, 8)}. Consider the following two SQL queries SQ1 and SQ2 ... (A) 2 and 6 respectively (B) 6 and 2 respectively (C) 2 and 4 respectively (D) 4 and 2 respectively

Last Answer : (D) 4 and 2 respectively

Description : The dereferencing operator ……… is used when the object itself is used width in the member pointer. A) ->* B) .* C) Any of the above D) None of the above

Last Answer : B) .*

Description : Match the following a) : : i) Pointer to member declarator b) : :* ii) Pointer to member operator c) ->* iii) Scope resolution operator A) a-ii, b-iii, c-i B) a-iii, b-i, c-ii C) a-i b-ii, c-iii D) a-iii, b-ii, c-i

Last Answer : B) a-iii, b-i, c-ii

Description : A pointer can hold A) Single address at a time B) Two addresses at a time C) Number of addresses at a time D) No address

Last Answer : A) Single address at a time

Description : Pointer holds A) Value of variable B) Address of variable C) Value and address of variable D) Always null

Last Answer : B) Address of variable

Description : Array is A) Primary data type B) Pointer data type C) Heterogeneous data type D) Homogenous data type

Last Answer : D) Homogenous data type

Description : 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.

Last Answer : (B) ptr is a pointer to an array of 10 integers.

Description : What does the following expression means ? char *(*(* a[N]) ( )) ( ); (A) a pointer to a function returning array of n pointers to function returning character pointers. (B) a ... to characters (D) an array of n pointers to function returning pointers to functions returning pointers to characters.

Last Answer : Answer: A,B,C,D

Description : The order of a leaf node in a B+ tree is the maximum number of children it can have. Suppose that block size is 1 kilobytes, the child pointer takes 7 bytes long and search field value takes 14 bytes long. The order of the leaf node is ............ (1) 16 (2) 63 (3) 64 (4) 65

Last Answer : Answer: All

Description : The values of a, b and c respectively for the expression f(x) = x^3 + ax^2 + bx + c, if f(1) = f(2) = 0 and f(4) = f(0) are : -Maths 9th

Last Answer : f′(x)=3x2+2ax+6 f(x)⇒f′(x)≥0 3x2+2ax+6≥0 ⇒D≤0 4[a2−3b]≤0 a2≤3b ∴P=6×6×6(16)×6​=3616​=94​ Answer.

Description : 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

Last Answer : Answer: D

Description : Let R be the rectangular window against which the lines are to be clipped using 2D Sutherland-Cohen line clipping algorithm. The rectangular window has lower left-hand corner at (-5,1) and upper righthand corner at (3,7). ... s) is/are candidate for clipping? (A) AB (B) CD (C) EF (D) AB and CD

Last Answer : (D) AB and CD

Description : Consider a system with seven processes A through G and six resources R through W. Resource ownership is as follows: process A holds R and wants T process B holds nothing but wants T process C holds nothing but wants S process D holds U ... No (B) Yes, A, B, C (C) Yes, D, E, G (D) Yes, A, B, F

Last Answer : (C) Yes, D, E, G

Description : If the values of 'C' and 'R' shown in the illustration were 1 microfarad and 100 kOhms respectively, at what listed time would 'C' be considered fully charged? EL-0086 A. 0.1 second B. 0.2 second C. 0.5 second D. 5 seconds

Last Answer : Answer: C