0

Data and File Structures

Description: Data and file structure Data Structures and AlgorithmsData Structure
Number of Questions: 25
Created by:
Tags: Data and file structure Data Structures and Algorithms Data Structure
Attempted 0/25 Correct 0 Score 0

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


Correct Option: E
Explanation:

This algorithm is used to simulate complex systems in statistical physics and provides the method for obtaining a sequence of random samples from a probability distribution.

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


Correct Option: C
Explanation:

This data structure has at most one directed edge between a pair of vertices and self loops.

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


Correct Option: E
Explanation:

In this data structure, 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.

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


Correct Option: D
Explanation:

This algorithm is a strategy that sidesteps the issue of choosing the best depth limit by trying all possible depth limits.

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()


Correct Option: C
Explanation:

This file control function returns the current position of the file pointer on success and end of file on error.

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


Correct Option: D
Explanation:

This storage class concerns itself with the permanence of variables.

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


Correct Option: A
Explanation:

This data structure represents a list where the order does not matter to the application and has no duplicates.

Which mathematical function is used to return arc tangent of the given expression x/y?

  1. atan(x)

  2. tan(x/y)

  3. sin(x/y)

  4. atan2(x,y)

  5. cos(x/y)


Correct Option: D
Explanation:

This mathematical function is used to return arc tangent of the given expression x/y.

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


Correct Option: E
Explanation:

This data structure is an ordered list in which insertion always occurs at one end and deletion always occurs at the other end.

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


Correct Option: B
Explanation:

In this data structure, for every edge (a, b) there is also an edge (b, a).

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


Correct Option: C
Explanation:

In this specification of data structure, the user needs to create the sequence of instructions that will cause the operations to perform as specified.

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


Correct Option: E
Explanation:

In this file, an overflow area needs to be maintained to permit insertion in sequence.

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


Correct Option: B
Explanation:

In this data structure, there is exactly one edge directed from every other vertex.

Which of the following mathematical functions is used to return arc cosine of the given expression x/y?

  1. cos(x/y)

  2. acos(x/y)

  3. sin(x/y)

  4. tan(x/y)

  5. atan(x)


Correct Option: B
Explanation:

This mathematical function is used to return arc cosine of the given expression x/y.

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


Correct Option: B
Explanation:

This data structure is an undirected graph that can be drawn without crossing any edges.

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


Correct Option: E
Explanation:

In this storage class, the variables are created when the program is run and destroyed when the program is exited.

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


Correct Option: A
Explanation:

In this data structure, the elements cannot be inserted into the middle of list or deleted from the middle of the list.

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()


Correct Option: A
Explanation:

This file control function is used to reposition the file pointer and returns 0 on success and non-zero value on failure.

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


Correct Option: C
Explanation:

This file offers an effective way to organize data when there is a need to access individual records randomly.

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()


Correct Option: D
Explanation:

This file function returns the number of items that are successfully read from the file identified by the file pointer.

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


Correct Option: C
Explanation:

This data structure is an undirected graph that may contain multiple edges or loops.

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()


Correct Option: A
Explanation:

This function returns the number of items that are successfully written into the file identified by the file pointer.

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


Correct Option: A
Explanation:

In this specification of data structure, the user is modeling real life data in a specific context.

Which of the following mathematical functions is used to return arc sine of the given expression x/y?

  1. sin(x/y)

  2. cos(x/y)

  3. asin(x/y)

  4. tan(x/y)

  5. atan(x)


Correct Option: C
Explanation:

This mathematical function is used to return arc sine of the given expression x/y.

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()


Correct Option: B
Explanation:

This function is a macro that outputs a character to a file stream specified using file pointer.

- Hide questions