Data Structures and File Organizations
Comprehensive quiz covering data structures (graphs, sets, queues, deques), storage classes, file organization methods, and file control functions
Questions
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?
- Minimax algorithm
- Breadth first search algorithm
- Simulated annealing algorithm
- A* search algorithm
- Metropolis hastings algorithm
Which of the following data structures has at most one directed edge between a pair of vertices and self loops?
- Simple digraph
- Multi set
- Asymmetric diagraph
- Stack
- Array
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.
- connected graph
- simple digraph
- stack
- array
- bipartite graph
Which of the following algorithms is a strategy that sidesteps the issue of choosing the best depth limit by trying all possible depth limits?
- Depth first search algorithm
- Uniform cost search algorithm
- Breadth first search algorithm
- Iterative deepening search algorithm
- Minimax algorithm
Which of the following file control functions returns the current position of the file pointer on success and end of file on error?
- rewind()
- feof()
- ftell()
- ungetc()
- fclose()
Which of the following storage classes concerns itself with the permanence of variables?
- Automatic storage class
- Storage structure
- The Remote Stack Variable class
- Static storage class
- The Content Handler class
Which of the following data structures represents a list where the order does not matter to the application and has no duplicates?
- Set
- Multi set
- Stack
- Array
- Structure
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?
- Stack
- Multi set
- Array
- Structure
- Queue
In which of the following data structures, for every edge (a, b), there is also an edge (b, a)?
- Simple digraph
- Symmetric digraph
- Connected graph
- Array
- Structure
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?
- Abstract level
- Storage structure
- Implementation level
- Structure
- RAID level 0
In which of the following files, an overflow area needs to be maintained to permit insertion in sequence?
- Indexed file
- Command file
- Archive file
- Parameter file
- Indexed sequential file
In which of the following data structures, there is exactly one edge directed from every other vertex?
- Simple digraph
- Complete digraph
- Connected graph
- Array
- Tree
Which of the following data structures is an undirected graph that can be drawn without any crossing of the edges?
- Simple graph
- Planar graph
- Multigraph
- Simple digraph
- Structure
In which of the following storage classes, the variables are created when the program is run and destroyed when the program is exited?
- Automatic storage class
- Storage structure
- The remote stack frame class
- The remote stack variable class
- External storage class
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?
- Dequeue
- Multi set
- List
- Array
- Structure
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?
- fseek()
- rewind()
- feof()
- ungetc()
- fopen()
Which of the following files offers an effective way to organize data when there is a need to access individual records randomly?
- Indexed file
- Parameter file
- Direct file
- Command file
- Password file
Which of the following functions returns the number of items that are successfully read from the file identified by file pointer?
- ungetc()
- fopen()
- feof()
- fscanf()
- rewind()
Which of the following data structures is an undirected graph that may contain multiple edges or loops?
- Multi graph
- Simple graph
- Pseudo graph
- Simple digraph
- Array
Which of the following functions returns the number of items that are successfully written into the file identified by the file pointer?
- fprintf()
- fopen()
- ungetc()
- feof()
- rewind()
In which of the following specifications of data structure, the user is modeling real life data in a specific context?
- The application level
- The abstract level
- Storage structure
- RAID level 0
- Multi set
Which of the following function is a macro that outputs a character to a file stream specified using file pointer?
- getc()
- putc()
- ungetc()
- rewind()
- getInputStream()