First C++ Program

Duration: 28 min

This video lesson is available to enrolled students.

Return to /learn/BIHAR-STET-COMPUTER-SCIENCE-COMPLETE-COURSE/unit-9-object-oriented-programming/oops-with-c/basics-of-c/asset-first-c-program after enrolling

Inside: a video lesson and guided study material.

Module outline

  1. About the course: About the Course
  2. Mathematical Aptitude: Number System, HCF LCM, Divisibility Rules, Percentage, Ratio and Proportion (Ratios), Average, Profit and Loss, Time and Work, Mensuration and Geometry, Simple Interest and Compound Interest, Speed Time and Distance, Age Problems, Mixture and Alligation, Algebra, Powers and Exponents (Surds and Indices), Pipe and Cistern, Trigonometry, Statistics, Data Interpretation, Arithmetic
  3. Logical Reasoning: Series (Number and Letter Series) (Numerical Relations and Reasoning), Coding Decoding, Analogy, Blood Relations, Directions (Direction Test), Ranking, Order and Sequence, Non Verbal Reasoning (Spatial Aptitude) (Spatial Reasoning) (Visual Reasoning), Seating Arrangements, Syllogisms, Venn Diagram, Puzzle Solving (Puzzles), Logical Sequence Of Words, Deductive and Inductive Reasoning (Logical Deduction and Induction) (Prepositional Reasoning), Analytical Reasoning (Counting Figures Reasoning), Cubes & Dices, Calendar, Clock
  4. General Knowledge: Physics, Chemistry, Biology, History, Geography, Polity, Indian Economy, GK- Current Affairs, Static General Knowledge
  5. Art of Teaching: Nature, Objectives & Characteristics of Teaching, Learners & Learning Process, Factors Affecting Teaching, Methods of Teaching, Classroom Management & Communication, Teaching-Learning Aids & ICT Integration, Evaluation, Assessment & Measurement, Professional Development & Ethics, Policies, Acts & Contemporary Issues, Curriculum & School Environment, Guidance, Counselling & Mental Health, Inclusive Education & Special Needs, Micro-Teaching & Teaching Skills, Lesson Planning
  6. Environmental Science: Environment
  7. Unit 1 | Digital Electronics: Digital Systems & Boolean Basics, Logic Gates & Hardware, Boolean Expression, Boolean Minimization, Combinational Circuit, Sequential Circuits, Number System, Number Representation
  8. Unit 2 | COA: 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
  9. Unit 3 | C Programming: C Fundamentals, Control Flow, Functions, Arrays & Pointers, Storage Classes, Structures & Enums, DMA, Macros, Scoping & File Handling
  10. Unit 3 | Data Structures: Introduction to DS, Array, Stack, Queue, Linked List, Tree, Graphs, Hashing
  11. Unit 4 | Algorithms: Algorithm Analysis, Time Complexity Analysis, Sorting Algorithms, Dynamic Programming, Minimum Spanning Trees, Shortest Path Algos, Advanced Algorithms
  12. Unit 5 | Operating System: Introduction to OS, Process Management, CPU Scheduling, Process Synchronization, Threads & Process Creation, Deadlock, Memory Management, Virtual Memory, Disc Scheduling, File Management
  13. Unit 6 | Database Management System: Basics of DBMS, ER Diagram, Relational Model & Functional Dependencies, Keys & Integrity Constraints, Normalization (1NF - BCNF), Decomposition Properties & 4NF, File Organization & Indexing, Relational Algebra, SQL, Transaction Management, Concurrency Control
  14. Unit 7 | Computer Networks: Introduction to CN, Data Communication, DLL: Access Control, DLL: Flow Control, DLL: Error Control, DLL: Framing, Data Link Layer - Ethernet, Net Layer: IPv4 & Proto, Net Layer: IP Addressing, Net Layer:Routing Protocol, Transport Layer Services, TL: Congestion & UDP, Application Layer
  15. Unit 8 | Software Engineering: Fundamentals of Software Engineering, Software Requirements and Quality Assurance, Software Design, Estimation and Metrics, Software Testing, Software Maintenance and Configuration Management
  16. Unit 9 | Object Oriented Programming: OOPS with C++
  17. Unit 10 | Web Development: HTML Basics, CSS, JavaScript-Basics, XML
  18. Unit 11 | Theory Of Computation: Introduction to TOC, Deterministic FA (DFA), Non-Deterministic FA, Regular Expressions, Grammar, Regular Language Properties, Moore & Mealy Machines, Pushdown Automata & CFG, Turing Machines
  19. Unit 12 | IoT: Emerging Tech Trends, Cloud Computing
  20. Unit 13 | Artificial Intelligence: Approaches to AI, Search Algorithms, Game Playing, Knowledge Representation, Natural Language Processing, Artificial Neural Networks, Genetic Algorithms
  21. Unit 14 | E-Commerce: Electronic Data Interchange and E-Commerce, Role of Internet and Web Services, Security in Mobile and Wireless Computing, Physical Security and Cryptography Basics, Cyber Safety and Security
  22. Unit 15 | Multimedia: Multimedia
  23. Unit 16 | Python: Introduction to Python, Tokens, Variables, Data Types, I/O, Operators & Expressions, Control Flow & Looping, Collections & Strings, Functions & Modules, File Handling & Data Analysis, DSA using Python
  24. Full Length Mock Tests — General Paper:
  25. Full Length Mock Tests — Computer Science (Paper II):
AI summary & chapters

AI Summary

An AI-generated summary of this video lecture.

This lecture introduces the basics of C++ through a structured walkthrough of a simple program that calculates and prints the sum of two variables. The instructor begins with a title slide for 'OOPS with C++' and transitions into the basic structure of a C++ program, highlighting key components such as preprocessor directives, namespace declarations, and variable definitions. The explanation covers the header file section, specifically breaking down `#include <iostream>` into its components (Input, Output, Stream) and comparing it to C's `stdio.h`. The lecture then details the types of streams, including input and output operations using `cin` and `cout`, as well as the extraction (`>>`) and insertion (`<<`) operators. A table maps standard stream objects like `cin`, `cout`, `cerr`, and `clog` to their purposes. The role of the `std` namespace is explained, showing how `using namespace std;` allows direct access to standard library members. The main function is identified as the entry point of a C++ program, with a step-by-step flow of execution from compiler reading to operating system control return. Finally, the lecture covers variable declaration rules and introduces the `getch()` function from `<conio.h>`, which reads a single character without echoing it to the screen, often used to pause console programs before they close.

Chapters

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

    The video opens with a title slide displaying 'OOPS with C++' and the subtitle 'Basics of C++'. The instructor then transitions to a slide titled 'Basic Structure of C++ Program', showing a code editor with a simple program. Red underlines highlight the `#include<iostream>` directive, `using namespace std;`, and the `int main()` function. The code includes variable declarations `int a = 10, b = 20, sum;` and a calculation `sum = a + b;`. A handwritten note appears comparing the C++ output to the C language `printf` function, specifically noting 'printf("Sum' next to the processing section.

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

    The lecture moves to a 'C++ Program Explanation' slide, focusing on the header file section. The instructor explains that a header file contains declarations of functions, classes, objects, and constants used in C++. The `#include <iostream>` directive is underlined, and the meaning of 'iostream' is broken down into 'I --> Input', 'O --> Output', and 'Stream --> Flow of data'. The instructor circles the phrase 'reuse code' and writes 'stdio.h' next to the iostream breakdown, drawing a parallel between C++ and C header files. Key terms like 'functions', 'classes', and 'objects' are underlined for emphasis.

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

    A slide titled 'Types of Streams' is presented, with red hand-drawn circles around the phrase 'input device (keyboard)'. The slide lists an Input Stream example `int age; cin >> age;` and an Output Stream example `cout<<age;`. Bullets explain the Extraction Operator (`>>`) and Insertion Operator (`<<`). A table titled 'Objects Provided by iostream' maps `cin`, `cout`, `cerr`, and `clog` to their full forms (Character Input/Output/Error/Log) and purposes. Red checkmarks are added beside the `cin` and `cout` rows, and a handwritten 'print' with an arrow appears at the left to mark teaching emphasis on output operations.

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

    The lecture explains the namespace declaration, noting that 'The C++ Standard Library uses the std namespace'. A slide lists common `std` members including `cout`, `cin`, `endl`, `string`, and `vector`. Code lines `std::cout << "Hello";` and `std::cin >> num;` are shown to demonstrate explicit namespace usage. The phrase `using namespace std;` is underlined in red, paired with a bullet stating it allows direct use of `std` members without writing `std::` repeatedly. Red handwritten marks include the word 'calc' at the top with a left-pointing arrow and a circle around the word 'related', emphasizing the connection between namespace declarations and code organization.

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

    A slide titled '3. Main Function' states that `main()` is the entry point of a C++ program and shows an example block: `int main() { // Statements return 0; }`. A numbered section 'Flow of Program Execution' runs from the compiler reading the program to control returning to the Operating System. Red pen annotations add checkmarks beside bullets and underline `main()`, 'function body', and 'successful program execution'. A large red brace is drawn around the example code, and another braces the five-step flow list. Circles mark 'functions', 'classes', and 'namespaces' to highlight their roles in program structure.

  6. 20:00 – 25:00 20:00-25:00

    The video transitions to explaining C++ variable declaration rules, showing syntax and naming conventions on a slide. The instructor then introduces the `getch()` function, detailing how it reads a single character from the keyboard without displaying it and does not require the Enter key. A code example in `getch_example.cpp` is displayed, demonstrating how to use `getch()` to pause a program before closing the console. The slide includes text such as 'Reads one character' and 'No echo on the screen', with red arrows pointing to specific lines of code in the editor.

  7. 25:00 – 28:03 25:00-28:03

    The lecture concludes with further details on the `getch()` function, emphasizing its use in `<conio.h>` for console applications. The instructor highlights that `getch()` is useful for pausing programs, as shown in the code example with the message 'Press any key to exit...'. The slide reinforces that `getch()` reads one character without echo, making it distinct from standard input operations. The final frames show the complete code structure integrating `getch()` into a basic C++ program, providing students with a practical example of handling user input and console behavior.

The lecture provides a foundational overview of C++ programming, starting with the basic structure of a program and progressing through key components like header files, namespaces, and the main function. The instructor uses a simple sum-of-two-variables program as a running example, annotating code with red underlines and handwritten notes to highlight important syntax. The explanation of `iostream` breaks down the acronym into Input, Output, and Stream, drawing parallels to C's `stdio.h`. The types of streams are detailed with examples of `cin` and `cout`, along with the extraction and insertion operators. A table clarifies the purposes of standard stream objects (`cin`, `cout`, `cerr`, `clog`). The role of the `std` namespace is explained, showing how `using namespace std;` simplifies code by allowing direct access to standard library members. The main function is identified as the entry point, with a step-by-step flow of execution from compiler to operating system. Finally, variable declaration rules and the `getch()` function are covered, providing practical tools for console applications. The lecture emphasizes visual annotations and comparisons to C language concepts to aid understanding.

Loading lesson…