0

Data and File Structures

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

In which of the following files, each record must have associated with it in integer key value that will help to identify the slot?

  1. Sequential file

  2. Relative file

  3. Command file

  4. Parameter file

  5. Password file


Correct Option: B
Explanation:

In this file, each record must have associated with it in integer key value that will help to identify the slot.

Which of the following functions is used to return floating point remainder of a given expression x/y?

  1. fmod(x, y)

  2. pow(x,y)

  3. sin(x/y)

  4. abs(x/y)

  5. tan(x/y)


Correct Option: A
Explanation:

This function is used to return floating point remainder of a given expression x/y.

Which of the following data structures is a special type of data structure in which insertions and deletions are done either at the front end or at the rear end of the queue?

  1. Deque

  2. Ordinary queue

  3. Linked list

  4. Set

  5. Array


Correct Option: A
Explanation:

This data structure is a special type of data structure in which insertions and deletions are done either at the front end or at the rear end of the queue.

Which of the following functions accepts file pointer as a parameter and resets the position of the file pointer to the start of the file?

  1. getc()

  2. rewind()

  3. isset()

  4. fscanf()

  5. fclose()


Correct Option: B
Explanation:

This function accepts file pointer as a parameter and resets the position of the file pointer to the start of the file.

Which of the following functions is used to add/append the content of the source string into the content of the target string?

  1. strcpy()

  2. strlen()

  3. strlwr()

  4. strcat()

  5. abs()


Correct Option: D
Explanation:

This function is used to add/append the content of the source string into the content of the target string.

Which of the following string functions is used to copy first n characters of one string to another string?

  1. strcpy()

  2. strlwr()

  3. strlen()

  4. getc()

  5. strncpy()


Correct Option: E
Explanation:

This string function is used to copy first n characters of one string to another string.

Which of the following functions is used to obtain the current position of the file pointer?

  1. fscanf()

  2. ftell()

  3. ferror()

  4. strcat()

  5. abs()


Correct Option: B
Explanation:

This function is used to obtain the current position of the file pointer.

Which of the following files is similar to the relative file except that the key value need not be an integer?

  1. Sequential file

  2. Data file

  3. Parameter file

  4. Direct file

  5. Archive file


Correct Option: D
Explanation:

This file is similar to the relative file except that the key value need not be an integer.

Which of the following functions pushes the character read previously using getc() back into input stream pointed to by the file pointer?

  1. getc()

  2. GET

  3. fscanf()

  4. ungetc()

  5. ferror()


Correct Option: D
Explanation:

This function pushes the character read previously using getc() back into input stream pointed to by the file pointer.

A variable is said to belong to which of the following classes, if the validity of the variable is from the point of definition of the rest of the program?

  1. Automatic storage class

  2. Register storage class

  3. Storage structure

  4. External storage class

  5. The RemoteStackVariable class


Correct Option: D
Explanation:

A variable is said to belong to the external storage class, if the validity of the variable is from the point of definition to the rest of the program.

Which of the following data structures represents the collection of objects which may or may not contain duplicates?

  1. Set

  2. queue

  3. List

  4. array

  5. Tree


Correct Option: C
Explanation:

This data structure represents the collection of objects, which may or may not contain duplicates.

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

  1. tan(x/y)

  2. sin(x/y)

  3. atan2(x,y)

  4. cos(x/y)

  5. pow(x,y)


Correct Option: C
Explanation:

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

Which of the following mathematical functions is used to return arc tangent of the given variable x?

  1. tan(x)

  2. sin(x)

  3. cos(x)

  4. pow(x,y)

  5. atan(x)


Correct Option: E
Explanation:

This mathematical function is used to return arc tangent of the given variable x.

At which of the following specification of the data structure, the user or data structure designer is free to think outside the bounds of anyone programming language?

  1. The application level

  2. Data structure

  3. The abstract level

  4. Storage structure

  5. Set


Correct Option: C
Explanation:

At this specification of data structure, the user or data structure designer is free to think outside the bounds of anyone programming language.

In which of the following specification of the data structure, one needs to determine where the data will reside and allocate space in that storage area?

  1. Application level

  2. Storage structure

  3. Data structure

  4. Array

  5. Implementation level


Correct Option: E
Explanation:

In this specification of data structure, one needs to determine where the data will reside and allocate space in that storage area.

Which of the following string functions is used to compare first n characters of the given two strings?

  1. strncmp()

  2. strcmp()

  3. strcpy()

  4. strlen()

  5. strlwr()


Correct Option: A
Explanation:

This string function is used to compare first n characters of the given two string.

Which of the following operators is used to get the content of the address pointed by a pointer variable to a particular memory location?

  1. Address of operator

  2. The comma operator

  3. Indirection operator

  4. Size of operator

  5. Decrement operator


Correct Option: C
Explanation:

This operator is used to get the content of the address pointed by a pointer variable to a particular memory location.

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

  1. Automatic storage class

  2. Static storage class

  3. Register storage class

  4. Storage structure

  5. The RemoteStackVariable class


Correct Option: B
Explanation:

Static storage class concerns itself with the permanence of the variables.

In which of the following files, no sequence is imposed on the storage of records in the data files, therefore no overflow area is needed?

  1. Sequence file

  2. Archive file

  3. Indexed file

  4. Parameter file

  5. Password file


Correct Option: C
Explanation:

In this file, no sequence is imposed on the storage of records in the data files, therefore, no overflow area is needed.

Which of the following data structures represents an ordered list in which insertion and deletion both occur only at one end?

  1. Queue

  2. Stack

  3. Set

  4. Array

  5. Linked list


Correct Option: B
Explanation:

This data structure represents an ordered list in which insertion and deletion both occur only at one end.

Which of the following file control functions is used to move the file pointer to the desired position within the file?

  1. ferror()

  2. fseek()

  3. fscanf()

  4. getc()

  5. fopen()


Correct Option: B
Explanation:

This file control functions is used to move the file pointer to the desired position within the file.

Which of the following functions accepts file pointer, as a parameter and returns either a non zero integer or a zero integer?

  1. feof()

  2. ferror()

  3. fscanf()

  4. getc()

  5. fclose()


Correct Option: A
Explanation:

This file function accepts file pointer as a parameter and returns either a non zero integer or a zero integer.

Which of the following data structures represents a list where the order does not matter to the application and it may contain duplicates?

  1. Multi set

  2. Set

  3. Linked list

  4. Ordinary queue

  5. Array


Correct Option: A
Explanation:

This data structure represents a list where the order does not matter to the application, and it may contain duplicates.

Which of the following operators is used in providing a global scope form the variable?

  1. Address of operator

  2. Size of operator

  3. The comma operator

  4. Increment operator

  5. Scope resolution operator


Correct Option: E
Explanation:

This operator is used in the context of closes and in providing a global scope for the variable.

When data structures such as arrays, structures and unions, set of values rather than just one, are to be referred then which of the following operators is used?

  1. Address of operator

  2. Membership operator

  3. The comma operator

  4. Sizeof operator

  5. Increment operator


Correct Option: B
Explanation:

When data structures such as arrays, structures and unions, set of values rather than just one, are to be referred by using membership operator.

- Hide questions