Data Structures and File Organizations

Comprehensive quiz covering data structures (graphs, sets, queues, deques), storage classes, file organization methods, and file control functions

22 Questions Published

Questions

Question 1 Multiple Choice (Single Answer)

Which of the following algorithms is used to simulate complex systems in statistical physics and provides the method for obtaining a sequence of random samples from a probability distribution?

  1. Minimax algorithm
  2. Breadth first search algorithm
  3. Simulated annealing algorithm
  4. A* search algorithm
  5. Metropolis hastings algorithm
Question 2 Multiple Choice (Single Answer)

Which of the following data structures has at most one directed edge between a pair of vertices and self loops?

  1. Simple digraph
  2. Multi set
  3. Asymmetric diagraph
  4. Stack
  5. Array
Question 3 Multiple Choice (Single Answer)

In _________, its vertex set V can be decomposed into two disjoint subsets V1 and V2 such that every edge in graph joins a vertex in V1 with a vertex in V2.

  1. connected graph
  2. simple digraph
  3. stack
  4. array
  5. bipartite graph
Question 4 Multiple Choice (Single Answer)

Which of the following algorithms is a strategy that sidesteps the issue of choosing the best depth limit by trying all possible depth limits?

  1. Depth first search algorithm
  2. Uniform cost search algorithm
  3. Breadth first search algorithm
  4. Iterative deepening search algorithm
  5. Minimax algorithm
Question 5 Multiple Choice (Single Answer)

Which of the following file control functions returns the current position of the file pointer on success and end of file on error?

  1. rewind()
  2. feof()
  3. ftell()
  4. ungetc()
  5. fclose()
Question 6 Multiple Choice (Single Answer)

Which of the following storage classes concerns itself with the permanence of variables?

  1. Automatic storage class
  2. Storage structure
  3. The Remote Stack Variable class
  4. Static storage class
  5. The Content Handler class
Question 7 Multiple Choice (Single Answer)

Which of the following data structures represents a list where the order does not matter to the application and has no duplicates?

  1. Set
  2. Multi set
  3. Stack
  4. Array
  5. Structure
Question 8 Multiple Choice (Single Answer)

Which of the following data structures is an ordered list in which insertion always occurs at one end and deletion always occurs at the other end?

  1. Stack
  2. Multi set
  3. Array
  4. Structure
  5. Queue
Question 9 Multiple Choice (Single Answer)

In which of the following data structures, for every edge (a, b), there is also an edge (b, a)?

  1. Simple digraph
  2. Symmetric digraph
  3. Connected graph
  4. Array
  5. Structure
Question 10 Multiple Choice (Single Answer)

In which of the following specifications of data structures, the user needs to create the sequence of instructions that will cause the operations to perform as specified?

  1. Abstract level
  2. Storage structure
  3. Implementation level
  4. Structure
  5. RAID level 0
Question 11 Multiple Choice (Single Answer)

In which of the following files, an overflow area needs to be maintained to permit insertion in sequence?

  1. Indexed file
  2. Command file
  3. Archive file
  4. Parameter file
  5. Indexed sequential file
Question 12 Multiple Choice (Single Answer)

In which of the following data structures, there is exactly one edge directed from every other vertex?

  1. Simple digraph
  2. Complete digraph
  3. Connected graph
  4. Array
  5. Tree
Question 13 Multiple Choice (Single Answer)

Which of the following data structures is an undirected graph that can be drawn without any crossing of the edges?

  1. Simple graph
  2. Planar graph
  3. Multigraph
  4. Simple digraph
  5. Structure
Question 14 Multiple Choice (Single Answer)

In which of the following storage classes, the variables are created when the program is run and destroyed when the program is exited?

  1. Automatic storage class
  2. Storage structure
  3. The remote stack frame class
  4. The remote stack variable class
  5. External storage class
Question 15 Multiple Choice (Single Answer)

In which of the following data structures, the elements cannot be inserted into the middle of the list or deleted from the middle of the list?

  1. Dequeue
  2. Multi set
  3. List
  4. Array
  5. Structure
Question 16 Multiple Choice (Single Answer)

Which of the following file control functions is used to reposition the file pointer and returns 0 on success and non-zero value on failure?

  1. fseek()
  2. rewind()
  3. feof()
  4. ungetc()
  5. fopen()
Question 17 Multiple Choice (Single Answer)

Which of the following files offers an effective way to organize data when there is a need to access individual records randomly?

  1. Indexed file
  2. Parameter file
  3. Direct file
  4. Command file
  5. Password file
Question 18 Multiple Choice (Single Answer)

Which of the following functions returns the number of items that are successfully read from the file identified by file pointer?

  1. ungetc()
  2. fopen()
  3. feof()
  4. fscanf()
  5. rewind()
Question 19 Multiple Choice (Single Answer)

Which of the following data structures is an undirected graph that may contain multiple edges or loops?

  1. Multi graph
  2. Simple graph
  3. Pseudo graph
  4. Simple digraph
  5. Array
Question 20 Multiple Choice (Single Answer)

Which of the following functions returns the number of items that are successfully written into the file identified by the file pointer?

  1. fprintf()
  2. fopen()
  3. ungetc()
  4. feof()
  5. rewind()
Question 21 Multiple Choice (Single Answer)

In which of the following specifications of data structure, the user is modeling real life data in a specific context?

  1. The application level
  2. The abstract level
  3. Storage structure
  4. RAID level 0
  5. Multi set
Question 22 Multiple Choice (Single Answer)

Which of the following function is a macro that outputs a character to a file stream specified using file pointer?

  1. getc()
  2. putc()
  3. ungetc()
  4. rewind()
  5. getInputStream()