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 back onto the stack. Now, one element is popped from the stack. The popped item is ................... (1) A (2) B (3) F (4) G

1 Answer

Answer :

Answer: 2

Related questions

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 : 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 : ……………. 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 : 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 : 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 : Inserting an item into the stack when stack is not full is called …………. Operation and deletion of item form the stack, when stack is not empty is called ………..operation. A) push, pop B) pop, push

Last Answer : A) push, pop

Description : The reverse polish notation equivalent to the infix expression ((A + B) * C + D)/(E + F + G) (A) A B + C * D + EF + G + / (B) A B + C D * + E F + G + / (C) A B + C * D + E F G + +/ (D) A B + C * D + E + F G + /

Last Answer : (A) A B + C * D + EF + G + /

Description : Which of the following is not an inherent application of stack? (A) Implementation of Stack (B) Evaluation of a postfix expression (C) Job Scheduling (D) Reverse a string

Last Answer : (C) Job Scheduling

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

Last Answer : B) 0 and -1

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 : 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 : A substance, when inserted between the poles of a magnet, is pushed out, what is it? -Do You Know?

Last Answer : answer:

Description : A substance, when inserted between the poles of a magnet, is pushed out, what is it?

Last Answer : Diamagnetic

Description : Is the following piece of code valid? >>> a=(1,2,3,4) >>> del a a) No because tuple is immutable b) Yes, first element in the tuple is deleted c) Yes, the entire tuple is deleted

Last Answer : c) Yes, the entire tuple is deleted

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 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 : 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 : The typical elements of process image are ..................... i) User data ii) System Data iii) User program iv) System stack A) i, iii and iv only B) i, ii, and iv only C) ii, iii, and iv only D) All i, ii, iii, and iv

Last Answer : A) i, iii and iv only

Description : A specific editor has 200 K of program text, 15 K of initial stack, 50 K of initialized data, and 70 K of bootstrap code. If five editors are started simultaneously, how much physical memory is needed if shared text is used ? (A) 1135 K (B) 335 K (C) 1065 K (D) 320 K

Last Answer : (B) 335 K

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 : Soft Pages breaks __________: a) are induced by the user b) are inserted by word automatically at the end of the page c) can be deleted d) are the one to show end of paragraph e) None of The Above

Last Answer : b) are inserted by word automatically at the end of the page

Description : The data in the stack is called: a. Pushing data b. Pushed c. Pulling d. None of these

Last Answer : a. Pushing data

Description : Can a view be updated/inserted/deleted? If Yes under what conditions ?

Last Answer : A View can be updated/deleted/inserted if it has only one base table if the view is based on columns from one or more tables then insert, update and delete is not possible.

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 : 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 : A data structure that follows the FIFO principle. a) Queue b) LL c) Stack d) Union

Last Answer : Answer: c Explanation: The answer is Stack. A stack follows the FIFO principle. FIFO stands for First In First Out This set of Tricky Computer Fundamentals Questions and Answers focuses on “Flowcharting Rules”

Description : A system wherein items are added from one and removed from the other end. a) Stack b) Queue c) Linked List d) Array

Last Answer : Answer: b Explanation: In a queue, the items are inserted from the rear end and deleted from the front end

Description : Best-First search can be implemented using the following data structure. a) Queue b) Stack c) Priority Queue d) Circular Queue

Last Answer : c) Priority Queue

Description : LIFO is ______ where as FIFO is ________ a) Stack, Queue b) Queue, Stack c) Priority Queue, Stack d) Stack. Priority Queue

Last Answer : a) Stack, Queue

Description : Best-First search can be implemented using the following data structure A : Queue B : Stack C : Priority Queue D : Circular Queue

Last Answer : C : Priority Queue

Description : Best-First search can be implemented using the following data structure A : Queue B : Stack C : Priority Queue D : Circular Queue

Last Answer : A : Queue

Description : Best-First search can be implemented using the following data structure A : Queue B : Stack C : Priority Queue D : Circular Queue

Last Answer : C : Priority Queue

Description : Best-First search can be implemented using the following data structure A : Queue B : Stack C : Priority Queue D : Circular Queue

Last Answer : C : Priority Queue

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 : ___ mode of addressing is a form of implied addressing: a. Stack b. Array Cc. Queue d. ‘Binary

Last Answer : a. Stack

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 : Which is used to store critical pieces of data during subroutines and interrupts: a. Stack b. Queue c. Accumulator d. Data register

Last Answer : a. Stack

Description : Which one of the following is not a linear data structure? (A) Array (B) Binary Tree (C) Queue (D) Stack

Last Answer : (B) Binary Tree 

Description : Identify the LIFO (Last In First Out) structure among the following: (1) Stack (2) Queue (3) De-queue (4) Array

Last Answer : Stack

Description : Are there some things your folks believed and pushed onto you against your will or to your embarassment or discomfort?

Last Answer : My mom insisted we wear orange on St Patrick’s day.

Description : A thread is usually defined as a light weight process because an Operating System (OS) maintains smaller data structure for a thread than for a process. In relation to this, which of the following ... separate stack for each thread. (D) OS does not maintain virtual memory state for each thread.

Last Answer : (B) OS maintains only CPU registers for each thread.

Description : An analog signal has a bit rate of 6000 bps and a baud rate of 2000 baud. How many data elements are carried by each signal element ? (A) 0.336 bits/baud (B) 3 bits/baud (C) 120,00,000 bits/baud (D) None of the above

Last Answer : (B) 3 bits/baud

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 : ……… is not the operation that can be performed on queue. A) Insertion B) Deletion C) Retrieval D) Traversal

Last Answer : D) Traversal

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 : 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 : 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 : 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 : Convert the following infix expression into its equivalent post fix expression (A + B^ D) / (E – F) + G (A) ABD^ + EF – / G+ (B) ABD + ^EF – / G+ (C) ABD + ^EF / – G+ (D) ABD^ + EF / – G+

Last Answer : (A + B^ D) / (E – F) + G