Data and File Structures

C programming data structures and file operations

14 Questions Published

Questions

Question 1 Multiple Choice (Single Answer)

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
Question 2 Multiple Choice (Single Answer)

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
Question 3 Multiple Choice (Single Answer)

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()
Question 4 Multiple Choice (Single Answer)

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()
Question 5 Multiple Choice (Single Answer)

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
Question 6 Multiple Choice (Single Answer)

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()
Question 7 Multiple Choice (Single Answer)

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
Question 8 Multiple Choice (Single Answer)

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
Question 9 Multiple Choice (Single Answer)

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
Question 10 Multiple Choice (Single Answer)

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
Question 11 Multiple Choice (Single Answer)

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
Question 12 Multiple Choice (Single Answer)

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()
Question 13 Multiple Choice (Single Answer)

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()
Question 14 Multiple Choice (Single Answer)

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