Object Slicing

Duration: 21 min

This video lesson is available to enrolled students.

Return to /learn/DSSSB-TGT-COMPUTER-SCIENCE-COMPLETE-COURSE/c-and-java-programming/oops-with-c/object-slicing-initializer-list/asset-object-slicing after enrolling

Inside: a video lesson and guided study material.

Module outline

  1. About Course: About the Course
  2. Section A: General Awareness / सामान्य जागरूकता: भारतीय संविधान / Indian Constitution, Scientific Achievements and Research / वैज्ञानिक उपलब्धियाँ और अनुसंधान, कोशिका: संरचना एवं कार्य / Cell: Structure and Function, ऊष्मागतिकी एवं साम्यावस्था / Thermodynamics and Equilibrium, खेल एवं क्रीड़ाएँ / Games and Sports, भारतीय राष्ट्रीय आंदोलन एवं स्वतंत्र भारत / Indian National Movement and Independent India, भारत का भौतिक पर्यावरण / India: Physical Environment, भारतीय अर्थव्यवस्था / Indian Economy, Current Affairs / समसामयिकी, अंकेक्षण / Auditing, History of English Literature, Digital India and Online Services, पृथ्वी: उत्पत्ति, आंतरिक संरचना एवं विवर्तनिकी / The Earth: Origin, Interior and Tectonics, Geomorphic Processes and Landforms / भू-आकृतिक प्रक्रियाएँ एवं स्थलरूप, Atmosphere and Climate / वायुमंडल एवं जलवायु, Hydrosphere: Oceans / जलमंडल: महासागर, जैवमंडल, मृदा एवं पर्यावरण / Biosphere, Soils and Environment, Natural Hazards and Disasters / प्राकृतिक संकट एवं आपदाएँ, जनसंख्या, मानव विकास एवं सांस्कृतिक भूगोल / Population, Human Development and Cultural Geography, संसाधन, कृषि, खनिज एवं ऊर्जा / Resources, Agriculture, Minerals and Energy, Industries, Services, Transport and Trade / उद्योग, सेवाएँ, परिवहन एवं व्यापार, प्रादेशिक एवं राजनीतिक भूगोल / Regional and Political Geography, Maps, Remote Sensing and Geographical Techniques / मानचित्र, सुदूर संवेदन एवं भौगोलिक तकनीकें, National Income Accounting / राष्ट्रीय आय लेखांकन, मुद्रा एवं बैंकिंग / Money and Banking, Inflation and Monetary Policy / मुद्रास्फीति एवं मौद्रिक नीति, Public Finance and Government Budget / लोक वित्त एवं सरकारी बजट, International Economics / अंतर्राष्ट्रीय अर्थशास्त्र, Economic Growth and Development / आर्थिक संवृद्धि एवं विकास, द्रव्य एवं रसायन विज्ञान की मूल अवधारणाएँ / Matter and Basic Concepts of Chemistry, परमाणु संरचना एवं नाभिकीय रसायन / Structure of Atom and Nuclear Chemistry, Periodic Classification and Chemical Bonding / आवर्त वर्गीकरण एवं रासायनिक आबंधन, States of Matter and Solutions / द्रव्य की अवस्थाएँ एवं विलयन, Redox Reactions and Electrochemistry / अपचयोपचय अभिक्रियाएँ एवं वैद्युतरसायन, धातुकर्म, s-ब्लॉक एवं p-ब्लॉक तत्व / Metallurgy, s-Block and p-Block Elements, d- and f-Block Elements and Coordination Compounds / d- एवं f-ब्लॉक तत्व तथा उपसहसंयोजन यौगिक, Organic Chemistry: Basic Principles and Isomerism / कार्बनिक रसायन: मूल सिद्धांत एवं समावयवता, हाइड्रोकार्बन, हैलोऐल्केन एवं हैलोऐरीन / Hydrocarbons, Haloalkanes and Haloarenes, Organic Compounds Containing Oxygen and Nitrogen / ऑक्सीजन एवं नाइट्रोजन युक्त कार्बनिक यौगिक, Biomolecules, Polymers and Everyday Chemistry / जैव-अणु, बहुलक एवं दैनिक जीवन में रसायन, Measurement and Mathematical Methods / मापन और गणितीय विधियाँ, गति और गति के नियम / Motion and Laws of Motion, कार्य, ऊर्जा, शक्ति और घूर्णी गति / Work, Energy, Power and Rotational Motion, Gravitation / गुरुत्वाकर्षण, Mechanical Properties of Matter / पदार्थ के यांत्रिक गुण, Thermal and Statistical Physics / तापीय और सांख्यिकीय भौतिकी, Oscillations and Mechanical Waves / दोलन और यांत्रिक तरंगें, Electrostatics and Current Electricity / स्थिरवैद्युतिकी और धारा विद्युत, Magnetism, Induction and Alternating Current / चुम्बकत्व, प्रेरण और प्रत्यावर्ती धारा, Optics and Photonics / प्रकाशिकी और फोटोनिकी, Quantum Physics and Relativity / क्वांटम भौतिकी और आपेक्षिकता, Atoms, Nuclei and Astrophysics / परमाणु, नाभिक और खगोल भौतिकी, Political Ideologies / राजनीतिक विचारधाराएँ, World Political Thought / विश्व राजनीतिक चिंतन, Indian Political Thought / भारतीय राजनीतिक चिंतन, Comparative Politics / तुलनात्मक राजनीति, संघ सरकार / Union Government, संघवाद, राज्य और स्थानीय शासन / Federalism, State and Local Government, भारतीय राजनीति और जनभागीदारी / Indian Politics and Participation, Public Administration and Governance / लोक प्रशासन और सुशासन, International Relations: Theories and Concepts / अंतरराष्ट्रीय संबंध: सिद्धांत और अवधारणाएँ, India's Foreign Policy / भारत की विदेश नीति, जीव जगत एवं जैविक वर्गीकरण / Living World and Biological Classification, Plant Physiology / पादप कार्यिकी, मानव कार्यिकी / Human Physiology, Molecular Basis of Inheritance / वंशागति का आणविक आधार, Evolution / विकास, Biotechnology / जैव प्रौद्योगिकी, पारिस्थितिकी एवं पर्यावरण / Ecology and Environment, Sources and Historiography / इतिहास के स्रोत एवं इतिहास-लेखन, Prehistoric Cultures and the Harappan Civilisation / प्रागैतिहासिक संस्कृतियाँ एवं हड़प्पा सभ्यता, Vedic Age and Religious Movements / वैदिक काल एवं धार्मिक आंदोलन, Post-Mauryan and Gupta Age / मौर्योत्तर एवं गुप्त काल, Harsha and Early Medieval India / हर्ष एवं पूर्व मध्यकालीन भारत, Delhi Sultanate and the Deccan Kingdoms / दिल्ली सल्तनत एवं दक्कन के राज्य, Mughal Empire and the Marathas / मुगल साम्राज्य एवं मराठा, European Arrival, British Expansion and 1857 / यूरोपीय आगमन, ब्रिटिश विस्तार एवं 1857, औपनिवेशिक शासन, अर्थव्यवस्था एवं समाज सुधार / Colonial Rule, Economy and Social Reform, Ancient, Medieval and Early Modern World / प्राचीन, मध्यकालीन एवं प्रारंभिक आधुनिक विश्व, Modern and Contemporary World / आधुनिक एवं समकालीन विश्व, Society, Community and Social Groups / समाज, समुदाय और सामाजिक समूह, Family, Marriage and Kinship / परिवार, विवाह और नातेदारी, Indian Society and Population / भारतीय समाज और जनसंख्या, Social Problems and Welfare / सामाजिक समस्याएँ और कल्याण, Agronomy and Farming Systems / शस्य विज्ञान एवं कृषि प्रणालियाँ, Plant Nutrition, Manures and Fertilizers / पादप पोषण, खाद एवं उर्वरक, Vegetables and Specialty Crops / सब्जी एवं विशिष्ट फसलें, Plant Protection / पादप संरक्षण, Animal Husbandry and Dairy Science / पशुपालन एवं दुग्ध विज्ञान, Agricultural Economics and Extension / कृषि अर्थशास्त्र एवं प्रसार शिक्षा, Olympic Movement, Sports Bodies and Awards / ओलंपिक आंदोलन, खेल संस्थाएँ एवं पुरस्कार, Sports Psychology, Growth and Sociology / खेल मनोविज्ञान, वृद्धि एवं समाजशास्त्र, Sports Management and Tournaments / खेल प्रबंधन एवं प्रतियोगिताएँ, Physical Education Pedagogy and Inclusion / शारीरिक शिक्षा का शिक्षणशास्त्र एवं समावेशन, Food Science, Processing and Food Safety / खाद्य विज्ञान, प्रसंस्करण और सुरक्षा, Fundamentals, Media and Techniques of Art / कला के मूल तत्व, माध्यम और तकनीक, Buddhist, Jain and Hindu Art / बौद्ध, जैन और हिन्दू कला, Indian Mural Painting / भारतीय भित्ति चित्रण, Indian Architecture, Temple Sculpture and Bronzes / भारतीय स्थापत्य, मंदिर मूर्तिकला और कांस्य, Indian Miniature Painting Schools / भारतीय लघुचित्र शैलियाँ, Modern Indian Art / आधुनिक भारतीय कला, Folk Art and Crafts / लोक कला और हस्तशिल्प, Modern Western Art / आधुनिक पाश्चात्य कला, Art Criticism, Art Writing and Art Institutions / कला समीक्षा, कला लेखन और कला संस्थाएँ, Fundamentals of Dance / नृत्य के मूल तत्व, History of Indian Dance and Treatises / नृत्य का इतिहास और शास्त्रीय ग्रंथ, Kathak: History and Gharanas / कथक: इतिहास और घराने, Kathak: Technique and Compositions / कथक: तकनीक और रचनाएँ, Bharatanatyam / भरतनाट्यम, Other Classical Dance Forms / अन्य शास्त्रीय नृत्य शैलियाँ, Folk and Contemporary Dance / लोक और समकालीन नृत्य, Vocal Forms and Styles / गायन शैलियाँ, Musical Instruments / वाद्य यंत्र, Gharanas and Musicians / घराने एवं संगीतज्ञ, Charvaka, Jaina and Buddhist Philosophy / चार्वाक, जैन एवं बौद्ध दर्शन, Cultural and Language Awareness / संस्कृति और भाषा परिचय, Books and Publications / पुस्तकें और प्रकाशन, Awards and Personalities / पुरस्कार और व्यक्तित्व, Defence and Security Awareness / रक्षा और सुरक्षा परिचय, State-Specific General Knowledge / राज्य विशेष सामान्य ज्ञान, राष्ट्रीय पहचान और महत्वपूर्ण दिवस / National Identity and Important Days
  3. Section A: General Intelligence & Reasoning ability / सामान्य बुद्धिमत्ता एवं तर्कशक्ति: Series / श्रेणी, Coding-Decoding / कूट लेखन एवं कूट वाचन, Data Sufficiency / आँकड़ों की पर्याप्तता, Non-Verbal Reasoning / अशाब्दिक तर्क, Analytical Reasoning (Counting Figures Reasoning) / विश्लेषणात्मक तर्क (आकृति गणना तर्क), Blood Relations / रक्त संबंध, Syllogisms / न्यायवाक्य, Statement-Based Reasoning / कथन आधारित तार्किक विवेचन, Seating Arrangement and Puzzles / बैठक व्यवस्था एवं पहेलियाँ, Direction and Distance / दिशा एवं दूरी, Mathematical Operations and Missing Numbers / गणितीय संक्रियाएँ एवं लुप्त संख्या, Calendar and Clock / कैलेंडर एवं घड़ी, Clock / घड़ी, Cubes, Dice and Figure Counting / घन, पासा एवं आकृतियों की गिनती, Data Sufficiency and Decision Making / आँकड़ों की पर्याप्तता एवं निर्णय क्षमता, Alphabet and Number Test / वर्णमाला एवं संख्या परीक्षण, Crypt Arithmetic / कूट अंकगणित, Venn Diagrams, Syllogism and Inequalities / वेन आरेख, न्याय वाक्य एवं असमानता, Inequality / असमानता, Analogy and Classification / सादृश्यता एवं वर्गीकरण, Order and Ranking / क्रम एवं रैंकिंग, Integers & Rational Numbers / पूर्णांक और परिमेय संख्याएँ
  4. Section A: Arithmetical & Numerical Ability / अंकगणितीय एवं संख्यात्मक योग्यता: Ratio and Proportion / अनुपात और समानुपात, Divisibility Rules / विभाज्यता के नियम, Data Interpretation / आँकड़ा निर्वचन, Mixture and Alligation / मिश्रण और एलिगेशन, Permutation and Combination / क्रमचय और संचय, Logarithm / लघुगणक, Number System / संख्या पद्धति, HCF and LCM / महत्तम समापवर्तक और लघुत्तम समापवर्त्य, अनुक्रम, श्रेणी और संयोजन / Sequences, Series and Combinatorics, Time, Speed and Distance / समय, चाल और दूरी, Percentage / प्रतिशत, Average / औसत, Profit, Loss and Discount / लाभ, हानि और बट्टा, Simple and Compound Interest / साधारण और चक्रवृद्धि ब्याज, Time and Work / समय और कार्य, Pipe and Cistern / नल और टंकी, Solid Mensuration / घन क्षेत्रमिति, Simplification, Indices and Surds / सरलीकरण, घातांक और करणी, Algebra / बीजगणित, Probability / प्रायिकता, Mental Ability / मानसिक योग्यता, Age Problems / आयु संबंधी प्रश्न, Partnership / साझेदारी, Statistics / सांख्यिकी, Arithmetic / अंकगणित, Speed Mathematics and Basic Mathematics / द्रुत गणित और आधारभूत गणित, वास्तविक और सम्मिश्र विश्लेषण / Real and Complex Analysis, Plane Mensuration / समतल क्षेत्रमिति
  5. Section A: English Language & Comprehension: Vocabulary, Subject Verb Agreement (Verb Noun Agreement), Adjectives, Verbs and Tenses, Reading Comprehension, Parts of Speech, Sentence Construction, Prepositions and Conjunctions, Direct and Indirect Speech, Sentence Completion (Fill in the blanks), Sentence Structure and Common Errors, Modals, Transformation of Sentences, Sentence Correction (Error Correction), Adverb, Conjunction, Cloze Test (Cloze Passage), Phonetics and Linguistics, Writing Skills, Prescribed School Lessons, Literary Forms and Devices, English Language Teaching
  6. Section A: हिंदी भाषा एवं बोध / Hindi Language & Comprehension: भाषा, लिपि और वर्ण, वर्तनी, वर्ण-विन्यास, अनुस्वार, अनुनासिक, चंद्रबिंदु और ‘र’ के रूप, संज्ञा और सर्वनाम, पद-भेद और रूप-विकार, लिंग, वचन, पुरुष और कारक, काल, वाच्य, वाक्य और वाक्य-भेद, संधि, समास, विलोम शब्द, पर्यायवाची शब्द, सामान्य अशुद्धियाँ, अनेक शब्दों के लिए एक शब्द, शब्द-भंडार, अपठित बोध, संज्ञानात्मक और रचनावादी अधिगम / Cognitive and Constructivist Learning, वर्णमाला, शब्द-विचार और शब्द-रचना, वाक्य-विचार, काव्यशास्त्र, हिंदी साहित्य का इतिहास-लेखन और आदिकाल, भक्तिकाल, रीतिकाल, आधुनिक हिंदी कविता, हिंदी गद्य साहित्य, लेखन, पत्रकारिता और प्रयोजनमूलक हिंदी, सन्धिः सन्धिविच्छेदश्च, धातुरूपाणि लकाराश्च, समासाः वृत्तयश्च
  7. Section B: Programming and Data Structures: C Fundamentals, Control Flow, Functions, Arrays & Pointers, Storage Classes, Structures & Enums, DMA, Macros, Scoping & File Handling, Introduction to DS, Array, Stack, Queue, Linked List, Tree, Graphs, Hashing, Language Design, Intro to Compilers, Visual Basics, Syntax Analysis: Bottom-Up
  8. Section B: C++ and Java Programming: OOPS with C++, Java Fundamentals, Array, String, IO & References, OOPS with Java, Generic & Collections, Multithreading, File Handling & I/O, Java, Object Oriented Technology
  9. Section B: Computer Networks, TCP/IP & Network Security: Introduction to CN, Data Communication, DLL: Flow Control, DLL: Access Control, DLL: Error Control, DLL: Framing, Data Link Layer - Ethernet, Net Layer: IPv4 & Proto, Net Layer: IP Addressing, Transport Layer Services, TL: Congestion & UDP, Application Layer, Hardware basics, Network Access Technologies, Network Security, Cloud Computing, Mobile Computing, Net Layer:Routing Protocol, Cyber Safety and Security
  10. Section B: Teaching Methodology / शिक्षण पद्धति: Growth and Development / वृद्धि और विकास, शिक्षा का अर्थ, उद्देश्य एवं दर्शन / Meaning, Aims and Philosophy of Education, Theories of Development / विकास के सिद्धांत, Inclusive Education / समावेशी शिक्षा, विज्ञान शिक्षणशास्त्र / Science Pedagogy, Assessment and Evaluation / आकलन और मूल्यांकन, Socialisation and Gender / समाजीकरण और जेंडर, शिक्षा, समाज एवं जेंडर / Education, Society and Gender, Cognitive Processes / संज्ञानात्मक प्रक्रियाएँ, Teaching Planning and Teaching Skills / शिक्षण योजना और शिक्षण कौशल, Personality Development / व्यक्तित्व विकास, Teaching Methods / शिक्षण विधियाँ, Learning and Behavioural Theories / अधिगम और व्यवहारवादी सिद्धांत, व्यक्तिगत भिन्नताएँ, क्षमताएँ और व्यक्तित्व / Individual Differences, Abilities and Personality, अभिप्रेरणा और स्वनिर्देशित अधिगम / Motivation and Self-Directed Learning, Teaching Methods and Approaches / शिक्षण विधियाँ एवं उपागम, Teaching-Learning Process and Classroom Management / शिक्षण-अधिगम प्रक्रिया एवं कक्षा प्रबंधन, Teaching Aids and Educational Technology / शिक्षण सहायक सामग्री एवं शैक्षिक तकनीकी, Microteaching and Classroom Communication / सूक्ष्म शिक्षण एवं कक्षा संप्रेषण, Assessment and Evaluation / आकलन एवं मूल्यांकन, Curriculum, Arts and Co-curricular Areas / पाठ्यचर्या, कला एवं सह-शैक्षिक क्षेत्र, Education of Children with Disabilities / दिव्यांग बच्चों की शिक्षा, Teacher: Qualities, Professional Ethics and Development / शिक्षक: गुण, व्यावसायिक नैतिकता एवं विकास, Educational Objectives and Bloom's Taxonomy / शैक्षिक उद्देश्य एवं ब्लूम का वर्गीकरण, Lesson Planning / पाठ योजना, समावेशी शिक्षा / Inclusive Education, Guidance and Counselling / निर्देशन एवं परामर्श, Mental Health and Guidance / मानसिक स्वास्थ्य और मार्गदर्शन, Teaching Aids and Educational Technology / शिक्षण सहायक सामग्री और शैक्षिक तकनीकी, हिंदी शिक्षणशास्त्र, Listening, Conversation and Communication Skills / श्रवण, वार्तालाप और संचार कौशल, Data Collection and Measurement / आँकड़ा संग्रह एवं मापन, Mathematics Pedagogy / गणित शिक्षणशास्त्र, Science and Scientific Inquiry / विज्ञान एवं वैज्ञानिक जाँच, Social Science Pedagogy / सामाजिक विज्ञान शिक्षणशास्त्र, संस्कृतशिक्षणम्, Pedagogy of History / इतिहास शिक्षणशास्त्र, Motivation and Emotion / अभिप्रेरणा और संवेग, Art Pedagogy / कला शिक्षण, Music Aesthetics and Music Teaching / संगीत सौंदर्यशास्त्र एवं संगीत शिक्षण, Educational Policies, Acts and Administration / शैक्षिक नीतियाँ, अधिनियम एवं प्रशासन
  11. Section B: Digital Electronics / Boolean Logic: Digital Systems & Boolean Basics, Logic Gates & Hardware, Boolean Expression, Boolean Minimization, Combinational Circuit, Sequential Circuits, Number System, Number Representation, Analog-Digital Conversion
  12. Section B: Operating Systems & Linux: Introduction to OS, Process Management, CPU Scheduling, Process Synchronization, Threads & Process Creation, Deadlock, Memory Management, Virtual Memory, File Management, Disc Scheduling, Unix OS, Linux OS, Distributed Systems, Windows OS
  13. Section B: Data Base Management System: Basics of DBMS, ER Diagram, Relational Model & Functional Dependencies, Keys & Integrity Constraints, Normalization (1NF - BCNF), Decomposition Properties & 4NF, Relational Algebra, SQL, File Organization & Indexing, Transaction Management, Concurrency Control, Database Security & Authorization, Database Recovery, Data Warehousing & Mining
  14. Section B: Internet & Web Technologies: Website, Browser & Services, Internet Fundamentals, Web Design & Development, Protocols & Services, Web Publishing & Hosting, Server Side & Security, Emerging Technologies, HTML Basics, HTML5, CSS, JavaScript-Basics, .Net Programming, Electronic Data Interchange and E-Commerce, XML, Ajax
  15. Section B: Computer Fundamentals, IT Basics & Architecture: Basics of COA, Cache Memory Organization, Input Output Organisation, Register Transfer and Microoperations, Control Unit Design, Programming the Basic Computer, Instr Formats & Modes, Floating Point Rep
  16. Section B: Python Language: Introduction to Python, Tokens, Variables, Data Types, I/O, Operators & Expressions, Control Flow & Looping, Collections & Strings, Functions & Modules, File Handling & Data Analysis
  17. Section B: Software Engineering: Fundamentals of Software Engineering, Software Requirements and Quality Assurance, Software Design, Estimation and Metrics, Software Testing, Software Maintenance and Configuration Management, extras, Fundamentals of Systems and Information Systems
  18. Section B: Design & Analysis of Algorithms: Algorithm Analysis, Time Complexity Analysis, Sorting Algorithms, Greedy Algorithms, Dynamic Programming, Minimum Spanning Trees, Shortest Path Algos, Advanced Algorithms
  19. Section B: Mathematics / गणित: Linear Algebra / रैखिक बीजगणित, Calculus / कलन, Trigonometry / त्रिकोणमिति, Vectors / सदिश, Set Theory, Functions, Relations, Propositional and Predicate Logic, Research Process Steps / शोध प्रक्रिया के चरण, Graph Theory, Sets, Relations, Functions and Discrete Mathematics / समुच्चय, संबंध, फलन और विविक्त गणित, Number Systems and Number Theory / संख्या पद्धति और संख्या सिद्धांत, Euclidean Geometry and Mensuration / यूक्लिडीय ज्यामिति और क्षेत्रमिति, Statistics and Probability / सांख्यिकी और प्रायिकता, Coordinate Geometry, Vectors and 3D Geometry / निर्देशांक ज्यामिति, सदिश और त्रिविमीय ज्यामिति, Polynomials, Equations and Complex Numbers / बहुपद, समीकरण और सम्मिश्र संख्याएँ
  20. Section B: Computer Graphics, Multimedia & Mobile Computing: Basics of Computer Graphics, 2-D Geometrical Transforms and Viewing, 3-D Object Representation, Geometric Transformations and Viewing, Multimedia
  21. Section B: Emerging Trends: Emerging Trends and AI, Knowledge Representation, Natural Language Processing
  22. Section B: Society, Ethics and Cyber Laws: Society, Law & Ethics, Digital India and Online Services, Culture, Socialisation and Social Control / संस्कृति, समाजीकरण और सामाजिक नियंत्रण
  23. MIS / DSS / Expert Systems: Information Systems, MS Office Applications, Terms & Abbreviations
  24. Business Studies and Management / व्यवसाय अध्ययन एवं प्रबंधन: Video Lectures, Business Communication / व्यावसायिक संचार, Principles and Functions of Management / प्रबंध के सिद्धांत एवं कार्य, Accounting Fundamentals and Recording of Transactions / लेखांकन के आधार एवं लेन-देनों का अभिलेखन, Depreciation, Final Accounts and Computerised Accounting / ह्रास, अंतिम खाते व कंप्यूटरीकृत लेखांकन, Knowledge Management & New Economy / ज्ञान प्रबंधन और नई अर्थव्यवस्था, Consumer Behaviour and Demand / उपभोक्ता व्यवहार एवं माँग, Production and Costs / उत्पादन एवं लागत, Determination of Income and Employment / आय एवं रोज़गार का निर्धारण, Special Accounts / विशेष लेखे, Partnership Accounts / साझेदारी लेखांकन, Company Accounts / कंपनी लेखांकन, Analysis of Financial Statements / वित्तीय विवरणों का विश्लेषण, Cost and Management Accounting / लागत एवं प्रबंध लेखांकन, Business Foundations and Entrepreneurship / व्यवसाय के आधार एवं उद्यमिता, Business Finance, Banking and Financial Markets / व्यावसायिक वित्त, बैंकिंग एवं वित्तीय बाज़ार, Business Mathematics and Statistics / व्यावसायिक गणित एवं सांख्यिकी
  25. E-Commerce: Volume - I, Volume - II
  26. DSSSB Previous Year Paper:
  27. Full Mock Test:
  28. Section B - Mock Tests:
AI summary & chapters

AI Summary

An AI-generated summary of this video lecture.

This lecture introduces Object Slicing in C++, a phenomenon where derived class-specific data members are lost when a derived object is assigned to a base class variable. The instructor begins by defining the concept using syntax examples like `Base b; Derived d;` followed by `b = d;`, visually demonstrating how the derived portion is "sliced off." The session progresses to illustrate memory layout and data loss through numerical examples, such as calculating `5+5=10` where only the base value is retained. The lecture then explores the utility of Object Slicing, particularly in scenarios requiring data hiding or working with legacy code. Examples involving `Employee` and `Manager` classes, as well as `User` and `Admin` classes, show how slicing can intentionally restrict access to sensitive derived information like passwords. The instructor concludes by summarizing the advantages of exposing only common base-class data and the disadvantages regarding the loss of derived data and disabled runtime polymorphism.

Chapters

  1. 0:00 – 2:00 00:00-02:00

    The video opens with a title slide displaying "OOPS with C++" and the subtitle "Object Slicing & Initializer List." It transitions to a slide defining Object Slicing as a phenomenon where derived class-specific data members are "sliced off" during assignment. The slide presents C++ syntax code showing `Base b; Derived d;` and the operation `b = d; // Object Slicing`. A diagram visualizes the relationship between a `base` class containing `int x` and a `derived : public base` class containing `int y`. The instructor introduces the concept, explaining that it occurs when a derived class object is assigned to a base class object. Visual aids show the syntax for declaring base and derived objects, followed by an assignment statement that triggers slicing. Annotations appear to highlight the specific lines of code involved in this process, emphasizing how derived-specific members are lost.

  2. 2:00 – 5:00 02:00-05:00

    The instructor explains the concept of Object Slicing in C++, where assigning a derived class object to a base class variable results in the loss of derived-specific data members. The visual aid shows a `base` class with member `x` and a `derived` class inheriting from it with an additional member `y`. The instructor writes code snippets demonstrating the assignment `b = d` and illustrates the slicing effect by writing '5' under `b` and calculating '5+5=10', implying that only the base part (value 5) is retained while the derived part (another 5) is lost. The video explains the concept of Object Slicing in C++, where a derived class object is assigned to a base class object, causing the loss of derived-specific data members and functions. The instructor highlights key terms like 'derived class' and 'base class' to emphasize the slicing mechanism. A visual example demonstrates how assigning a derived object `d` to a base object `b` results in only the base part being copied, effectively 'slicing off' the rest.

  3. 5:00 – 10:00 05:00-10:00

    The video explains Object Slicing in C++, demonstrating how assigning a derived class object to a base class object results in the loss of derived-specific members through syntax examples, code implementation, and memory layout visualization. The definition of Object Slicing in C++ is presented, explaining that assigning a derived class object to a base class object causes the loss of derived-specific members. Syntax example showing `Base b;` and `Derived d;` followed by the assignment `b = d;` which triggers object slicing. Class hierarchy diagram illustrating the 'base' class with member `x` and methods, and the 'derived' class inheriting from base but adding member `y`. Code implementation in an IDE showing the `base.h`, `derived.h`, and `main.cpp` files where object slicing occurs via assignment. Visual breakdown of memory layout showing the base part and derived part, emphasizing that only the base part is copied during assignment. Instructor gestures and annotations highlighting specific lines of code and class members to reinforce the concept.

  4. 10:00 – 15:00 10:00-15:00

    The video displays code examples for `base` and `derived` classes with handwritten annotations tracking variable values like `x1` and `y2`. The instructor explains the assignment `b = d`, noting that only the base class portion is copied while the derived part is lost. The slide title changes to "Utility of Object Slicing," introducing a scenario with `Employee` and `Manager` classes. Text on screen states that slicing is useful when only common base-class data is required. The instructor gestures to emphasize the loss of derived members during this process. The slide titled "Utility of Object Slicing" defines the concept as treating a derived object as a base object by copying only the base class portion. Code examples for `class Employee` and `class Manager : public Employee` are displayed to illustrate storing common information. A red hand-drawn diagram appears on the right, depicting memory layout or object structure with labels like "M", "C", and "SM".

  5. 15:00 – 20:00 15:00-20:00

    The lecture focuses on Object Slicing within C++ inheritance, explaining how derived objects are stored inside base class variables. The instructor uses a code example with 'User' and 'Admin' classes to demonstrate that only the base class part is copied, causing derived data like passwords to disappear. The session concludes by defining Object Slicing and listing its advantages and disadvantages regarding data exposure and polymorphism. Explanation of Security / Data Hiding using inheritance is provided, with code example showing User and Admin classes. Demonstration of data loss when assigning derived to base object is shown, with text stating "If you return User u = admin; Password disappears. Only common information remains." Discussion on Legacy Code usage is included, noting that old C++ programs sometimes intentionally store derived objects inside base. Definition of Object Slicing as copying only the Base Class part is reiterated, along with advantages and disadvantages regarding data exposure.

  6. 20:00 – 20:38 20:00-20:38

    The final segment summarizes the key takeaways of Object Slicing. The instructor reiterates that Object Slicing copies only the Base Class part of a Derived Object. The advantages are listed as storing or exposing only the common base-class information, which is useful for security and legacy code. The disadvantages are highlighted as losing derived-class data and disabling runtime polymorphism when objects are copied by value. The instructor emphasizes the intentional nature of slicing in specific scenarios where derived information should not be exposed, such as passwords in an Admin class. The video concludes with a clear distinction between the benefits of data hiding and the drawbacks regarding functionality loss.

The lecture provides a comprehensive overview of Object Slicing in C++, starting with the fundamental definition and progressing to practical applications. The instructor uses clear syntax examples like `Base b; Derived d;` and assignment operations to illustrate how derived-specific members are lost. Visual aids, including class hierarchy diagrams and memory layout breakdowns, reinforce the concept of data loss during assignment. The discussion on utility highlights specific use cases such as security through data hiding, where sensitive information like passwords in an `Admin` class is concealed by assigning it to a `User` object. Legacy code compatibility is another key application mentioned, where older programs store derived objects in base variables intentionally. The summary of advantages and disadvantages provides a balanced view, noting that while slicing restricts data exposure, it also disables runtime polymorphism and results in the loss of derived-class functionality. This structured approach ensures students understand both the mechanics and the strategic implications of Object Slicing in C++ programming.

Loading lesson…