Part 1 - Dive Deep in cin.get() function in C++

Duration: 7 min

This video lesson is available to enrolled students.

Return to /learn/AMCAT-PREPARATION/codingautomata-round/programming-in-c/c-mcqs-by-yash-sir/asset-part-1-dive-deep-in-cinget-function-in-c after enrolling

Inside: a video lesson and guided study material.

Module outline

  1. Quantitative Ability: Percentage, Profit and Loss, Ratio and Proportion (Ratios), Average, Time and Work, Speed Time and Distance, Simple Interest and Compound Interest, Age Problems, Number System, Divisibility Rules, HCF LCM, Algebra, Permutation and Combination, Probability, Data Interpretation, Logarithm, Sequence and Series (Series), Powers and Exponents (Surds and Indices), Speed Mathematics and Basic Mathematics
  2. Logical Reasoning: Seating Arrangements, Puzzle Solving (Puzzles), Data Arrangement, Coding Decoding, Blood Relations, Directions (Direction Test), Ranking, Order and Sequence, Data Sufficiency, Venn Diagram, Inequality, Series (Number and Letter Series) (Numerical Relations and Reasoning), Logical Sequence Of Words, Deductive and Inductive Reasoning (Logical Deduction and Induction) (Prepositional Reasoning), Selection Decision Table (Decision Making), Analogy, Non Verbal Reasoning (Spatial Aptitude) (Spatial Reasoning) (Visual Reasoning)
  3. Verbal Ability: Comprehension / Reading Comprehension / Unseen Passages (Critical Reasoning) (Paragraph Questions), Subject Verb Agreement (Verb Noun Agreement), Tenses, Articles, Preposition, Conjunction, Modals, Active Passive Voice (Voice), Direct and Indirect Speech, Vocabulary, Sentence Re-arrangements (Para Jumbles) (Narrative Sequencing), Sentence Completion (Fill in the blanks), Sentence Correction (Error Correction), Cloze Test (Cloze Passage), Facts, Inference and Judgements
  4. Programming Fundamentals (Technical): C Fundamentals
  5. Data Structures (Technical): Introduction to DS, Array, Stack, Queue, Linked List, Tree, Graphs, Hashing
  6. Algorithms (Technical): Algorithm Analysis, Sorting Algorithms, Greedy Algorithms, Dynamic Programming, Minimum Spanning Trees, Shortest Path Algos, Time Complexity Analysis, Advanced Algorithms
  7. OOPs (Technical): Object Oriented Programming (OOPS)
  8. DBMS (Technical): Basics of DBMS, ER Diagram, Relational Model & Functional Dependencies, Keys & Integrity Constraints, Normalization (1NF - BCNF), Decomposition Properties & 4NF, File Organization & Indexing, Relational Algebra, Relational Calculus, Transaction Management, Concurrency Control, Database Recovery, ORDBMS, Database Security & Authorization, Query Processing & Optimization, Enhanced Data Models, Data Warehousing & Mining, Big Data Systems, NoSQL
  9. SQL (Technical): SQL
  10. Operating Systems (Technical): Introduction to OS, Process Management, CPU Scheduling, Process Synchronization, Deadlock, Threads & Process Creation, Memory Management, Virtual Memory, Disc Scheduling, File Management, Windows OS, Linux OS, Security, Distributed Systems, Virtual Machines
  11. Computer Networks (Technical): 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, Hardware basics, Network Security, Cloud Computing and IoT, Cyber and Info Security
  12. Software Engineering (Technical): Fundamentals of Software Engineering, Software Requirements and Quality Assurance, Software Design, Estimation and Metrics, Software Testing, Software Maintenance and Configuration Management
  13. Coding/Automata Round: Coding Questions by Yash Sir, C Programming by Yash Sir, Programming in C++, Java, Python for Placements by Yash Sir, Pseudo Codes
  14. Personality / Behavioral Assessment: Behavioral Assessment (Behavioral Competency Profiling) (Psychometric Test)
  15. Writing Assessment: English Writing Ability
AI summary & chapters

AI Summary

An AI-generated summary of this video lecture.

This educational video is a C++ programming tutorial focused on the `cin.get()` function. The lecture begins with an introduction to the topic, followed by a multiple-choice question from Microsoft to test understanding of functions for reading a single character. The instructor explains that `cin.get(ch)` is the correct function, contrasting it with `getline()` and `cin>>`. The core of the lesson demonstrates the `cin.get()` function in a code example, showing how it reads a string including whitespace characters, unlike the `cin>>` operator which stops at whitespace. The video includes a live coding demonstration in an online IDE, where the function is used to read a string with spaces, and the output is shown. The instructor concludes by summarizing the key difference: `cin.get()` reads a string with whitespace, while `cin>>` terminates at whitespace.

Chapters

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

    The video opens with a title slide for a C++ programming lecture by Yash Jain, featuring a background of floating code. The instructor, visible in a small window, introduces the topic. The slide transitions to a new one titled "Getline In C++" with an illustration of a woman using a magnifying glass to examine a string, visually representing the concept of reading input. The instructor begins to explain the topic, setting the stage for the lesson on input functions.

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

    The video presents a multiple-choice question: "Which function is used to read a single character from the console in C++?" The options are a) cin.get(ch), b) getline(ch), c) read(ch), and d) scanf(ch). The instructor explains that the correct answer is a) cin.get(ch), as it is the standard C++ function for reading a single character. The instructor then transitions to a code example on a blackboard, writing `#include <iostream>` and `using namespace std;`. The main function is defined, and a character array `char arr[25]` is declared. The instructor writes the line `cin.get(arr, 25);` to demonstrate how to read a string with spaces, explaining that this function reads the entire line, including whitespace, until it reaches the specified limit or a newline character.

  3. 5:00 – 6:36 05:00-06:36

    The instructor demonstrates the `cin.get()` function in an online IDE. The code `#include <iostream> using namespace std; int main() { char arr[25]; cin.get(arr, 25); cout << arr; return 0; }` is shown. The instructor runs the program, and the output shows the string "yash jain" being printed, confirming that the function successfully reads the entire string including the space. The video then returns to a blackboard slide summarizing the key point: `cin.get()` is used for accessing a character array and it includes whitespace characters, unlike `cin>>` which terminates at whitespace. The instructor concludes by emphasizing this key difference.

The video provides a clear and structured lesson on the `cin.get()` function in C++. It effectively uses a combination of a multiple-choice question to engage the learner, a step-by-step code demonstration to illustrate the function's syntax, and a live coding session to show its practical application. The core teaching point is the distinction between `cin.get()` and the `cin>>` operator, with the former being the correct choice for reading strings that contain spaces. The visual aids, including the blackboard and the online IDE, reinforce the concepts, making the tutorial comprehensive and easy to follow.

Loading lesson…