Data structures
9 flashcards to master Data structures
Smart Spaced Repetition
Rate each card Hard, Okay, or Easy after flipping. Your progress is saved and cards are scheduled for optimal review intervals.
Define a 1D array and provide an example of its use.
A 1D array is a linear data structure that stores a collection of elements of the same data type under a single variable name, accessed via an index.
Explain the difference between a 1D and a 2D array, providing a real-world example for each.
A 1D array is a single row of elements, like a list. A 2D array is a table of rows and columns, like a spreadsheet. Example 1D: days of the week. Example 2D: seating arrangement in a cinema.
What is a 'record' in the context of data structures? Give an example.
A record is a collection of fields, possibly of different data types, treated as a single unit.
Describe the purpose of a 'file' in computer science, and outline two common file types.
A file is a named location on storage that holds data or information. Two common file types are text files (
Explain the difference between 'read', 'write', and 'append' operations when working with files.
'Read' retrieves data from a file. 'Write' overwrites existing data or creates a new file. 'Append' adds data to the end of an existing file.
Explain the significance of the 'open' and 'close' operations when working with files.
'Open' prepares a file for reading or writing, establishing a connection between the program and the file. 'Close' terminates this connection, releasing resources and ensuring data is saved.
Give an example scenario where using a 2D array would be more appropriate than using a 1D array. Explain why.
Storing the scores of students in multiple subjects. A 2D array allows easy access to a specific student's score in a specific subject using row (student) and column (subject) indices, which isn't directly possible in a 1D array.
Describe how to access the element in the 2nd row and 3rd column of a 2D array named 'data' using typical array indexing.
Assuming the array is indexed starting from 0, the element in the 2nd row and 3rd column would be accessed as `data[1][2]`.
Explain why efficient file handling (opening and closing files correctly) is crucial in programming.
Correct file handling prevents data loss, corruption, and resource leaks. Failing to close a file can leave it open and inaccessible to other programs and might cause the data being written to not be fully saved.
Key Questions: Data structures
Define a 1D array and provide an example of its use.
A 1D array is a linear data structure that stores a collection of elements of the same data type under a single variable name, accessed via an index.
What is a 'record' in the context of data structures? Give an example.
A record is a collection of fields, possibly of different data types, treated as a single unit.
Describe the purpose of a 'file' in computer science, and outline two common file types.
A file is a named location on storage that holds data or information. Two common file types are text files (
About Data structures (8.2)
These 9 flashcards cover everything you need to know about Data structures for your Cambridge IGCSE Computer Science (0478) exam. Each card is designed based on the official syllabus requirements.
What You'll Learn
- 3 Definitions - Key terms and their precise meanings that examiners expect
- 4 Key Concepts - Core ideas and principles from the 0478 syllabus
How to Study Effectively
Use the Study Mode button above to test yourself one card at a time. Try to answer each question before flipping the card. Review cards you find difficult more frequently.
Continue Learning
After mastering Data structures, explore these related topics:
- 8.1 Programming concepts - 10 flashcards
- 8.3 Procedures and functions - 10 flashcards
Study Mode
Space to flip • ←→ to navigate • Esc to close
You're on a roll!
You've viewed 10 topics today
Create a free account to unlock unlimited access to all revision notes, flashcards, and study materials.
You're all set!
Enjoy unlimited access to all study materials.
Something went wrong. Please try again.
What you'll get:
- Unlimited revision notes & flashcards
- Track your study progress
- No spam, just study updates