Size of an Array
Duration: 5 min
This video lesson is available to enrolled students.
Inside: a video lesson and guided study material.
Module outline
- About the Course: About the Course
- Paper-1 & 2 | Basic Numeracy: Ratio and Proportion (Ratios), Divisibility Rules, Mixture and Alligation, Permutation and Combination, Logarithm, Number System, HCF LCM, Sequence and Series (Series), Speed Time and Distance, Percentage, Average, Mensuration and Geometry, Age Problems, Arithmetic, Statistics, Probability, Profit and Loss, Simple Interest and Compound Interest, Partnership, Speed Mathematics and Basic Mathematics, Algebra, Powers and Exponents (Surds and Indices), Time and Work, Pipe and Cistern, RSSB Specific Videos - Basic Numeracy
- Paper-1 & 2 | Data Interpretation: Data Interpretation
- Paper-1 & 2 | General Mental Ability: Mental Ability, RSSB Specific Videos - Mental Ability
- Paper-1 & 2 | Logical Reasoning and Analytical Ability: Series (Number and Letter Series) (Numerical Relations and Reasoning), Coding Decoding, Data Sufficiency, Non Verbal Reasoning (Spatial Aptitude) (Spatial Reasoning) (Visual Reasoning), Syllogisms, Seating Arrangements, Blood Relations, Directions (Direction Test), Analytical Reasoning (Counting Figures Reasoning), Puzzle Solving (Puzzles), Calendar, Clock, Cubes & Dices, Venn Diagram, Analogy, Ranking, Order and Sequence, Deductive and Inductive Reasoning (Logical Deduction and Induction) (Prepositional Reasoning), Data Arrangement, Logical Sequence Of Words, Crypt Arithmetic
- Paper-1 & 2 | Decision Making and Problem Solving: Selection Decision Table (Decision Making)
- Paper-1 | General Science: Physics, Biology, Chemistry, RSSB Specific Videos
- Paper-1 | General Awareness: State Wise GK, GK- Current Affairs
- Paper - 2 | Digital Logic Systems: Digital Systems & Boolean Basics, Logic Gates & Hardware, Combinational Circuit, Sequential Circuits
- Paper-2 | Database Management System: Basics of DBMS, ER Diagram, Relational Model & Functional Dependencies, Keys & Integrity Constraints, Normalization (1NF - BCNF), Decomposition Properties & 4NF, Relational Calculus, Relational Algebra, SQL, NoSQL
- Paper-2 | Data Structures & Algorithms: Introduction to DS, Array, Stack, Queue, Linked List, Tree, Graphs, Algorithm Analysis, Sorting Algorithms, Intro to Compilers, Hashing
- Paper 2 | Data Communication and Network Security: Introduction to CN, Data Communication, Data Link Layer - Ethernet, DLL: Error Control, Net Layer: IPv4 & Proto, Net Layer: IP Addressing, Application Layer, Hardware basics, Network Security, Ethical Hacking
- Paper-2 | Operating Systems: Introduction to OS, Process Management, Memory Management, File Management, Deadlock
- Paper-2 | Computer Organization and Architecture: Basics of COA, Floating Point Rep, Cache Memory Organization, Input Output Organisation, Instr Formats & Modes, Control Unit Design, Register Transfer and Microoperations, Programming the Basic Computer, Number System, Number Representation
- Paper 2 | System Analysis and Design: Fundamentals of Systems and Information Systems, Fundamentals of Software Engineering, SDLC and Development Approaches, Software Documentation and Software Requirements Specification (SRS), SDD and Quality Assurance, Security, Risk Management & Maintenance, Software Testing
- Paper-2 | C Programming: C Fundamentals, Control Flow, Functions, Arrays & Pointers, Storage Classes, Structures & Enums, DMA, Macros, Scoping & File Handling
- Paper 2 | OOPS , C++ , JAVA: Language Design, OOPS with C++, Java, .Net Programming, Java Fundamentals
- Paper 2 | Python: Introduction to Python, Tokens, Variables, Data Types, I/O, Operators & Expressions, Control Flow & Looping, Collections & Strings, Functions & Modules, File Handling & Data Analysis
- Emerging Trends and AI: Emerging Tech Trends, Artificial Intelligence
- Paper-2 | Data Processing (Ms-Office): MS Office Applications
- Paper-2 | Internet and Web Technologies: HTML Basics, CSS, XML, JavaScript-Basics, Internet Fundamentals, Protocols & Services, Web Publishing & Hosting, Server Side & Security, Emerging Technologies, Terms & Abbreviations, Cyber Threats and Malware Attacks, Role of Internet and Web Services, Security in Mobile and Wireless Computing
- Paper 2 | Pedagogy: Child Development, Theories, Concept of Pedagogy, Inclusive Education, Experiential Pedagogy, Assessment & Evaluation, Psychology, Curriculum Framework & Reforms, National Education Policy (NEP) 2020
- Live Classes: RSSB Live Sessions
- Paper 1 - Full Mock Tests:
- Paper 2 - Full Mock Tests:
- BCI Previous Year Papers:
AI summary & chapters
AI Summary
An AI-generated summary of this video lecture.
This lecture introduces how to calculate the size of an array using bounds and element byte sizes. It begins with the formula Number of elements = (Upper bound – Lower Bound) + 1, defining lower and upper bounds as the first and last indices. The instructor then uses a hand-drawn array diagram with indices 1 through 8, labeling LB at index 1 and UB at index 8, and substitutes values to show (8 - 1) + 1. Additional examples include zero-based indexing and negative indices, such as (2-0)+1=3 and (1-(-6))+1 = 7+1 = 8, demonstrating that the formula works regardless of indexing style. The lesson transitions to types of array indexing—zero-based, one-based, and n-based—and later returns to the size formula. Finally, it introduces memory size calculation using Size = number of elements * Size of each element in bytes, with a worked example showing 8 × 2B = 16B. A memory location table maps indices to stored letters, reinforcing how array elements occupy consecutive addresses.
Chapters
0:00 – 2:00 00:00-02:00
The slide titled “Size of an array” displays the formula “Number of elements = (Upper bound – Lower Bound) + 1,” with bullets defining the lower bound as the index of the first element and the upper bound as the index of the last element. The instructor gestures with a pen while explaining, then draws a row of boxes to represent an array. Numbers 1 through 8 are written above the boxes, and arrows label the first index as LB and the last as UB. The instructor substitutes these values into the formula, showing (8 - 1) + 1 to calculate the number of elements.
2:00 – 5:00 02:00-05:00
The instructor continues applying the size formula to different indexing schemes. A second example uses indices from 0 to -7, with calculations such as (2-0)+1=3 and (1-(-6))+1 = 7+1 = 8, illustrating that negative bounds still yield the correct element count. The lecture then shows a slide titled “Types of indexing in array:” listing zero-based, one-based, and n-based indexing, with red underlines emphasizing the options. Returning to the “Size of an array” slide, the instructor writes 8 - 1 + 1 above the formula and reinforces the LB/UB diagram. A cartoon appears with a doctor saying “Array Index starts from 1,” humorously reinforcing one-based indexing.
5:00 – 5:18 05:00-05:18
The final section shifts to calculating total memory size using the formula “Size = number of elements * Size of each element in bytes.” A green table labeled “Memory Location” shows columns 200–206 containing letters U, B, F, D, A, E, C over indices 0–6. The instructor underlines “number of elements” and then the entire formula, followed by a red worked example: = 8 X 2B, then = 16B. This connects the earlier element-count formula to byte-level memory allocation for a one-dimensional array.
The lecture progresses from defining array bounds to applying the element-count formula across multiple indexing conventions, then extends to memory size calculation. The central idea is that array size in elements depends only on the difference between upper and lower bounds plus one, independent of whether indices are positive, negative, zero-based, or one-based. The instructor supports this with visual diagrams and step-by-step substitutions, ensuring students can identify LB and UB in any array representation. The final transition to byte size introduces the practical memory formula, linking logical element count to physical storage requirements. Key exam-relevant points include memorizing both formulas, recognizing indexing types, and interpreting memory location tables.