Find second largest number from given 3 numbers
Duration: 3 min
This video lesson is available to enrolled students.
Inside: a video lesson and guided study material.
Module outline
- Communication Round: Vocabulary, Subject Verb Agreement (Verb Noun Agreement), Tenses, Comprehension / Reading Comprehension / Unseen Passages (Critical Reasoning) (Paragraph Questions), Cloze Test (Cloze Passage), Sentence Correction (Error Correction), Sentence Completion (Fill in the blanks), Sentence Re-arrangements (Para Jumbles) (Narrative Sequencing), Direct and Indirect Speech, Active Passive Voice (Voice), Verbal Analogy (Word Based Analogy), Articles, Preposition, Conjunction, Sentence Construction, English Writing Ability, Communication Assessment
- Quantitative Aptitude: Ratio and Proportion (Ratios), Divisibility Rules, Data Interpretation, Mixture and Alligation, Permutation and Combination, Logarithm, Number System, HCF LCM, Speed Time and Distance, Percentage, Average, Powers and Exponents (Surds and Indices), Time and Work, Mensuration and Geometry, Age Problems, Pipe and Cistern, Probability, Profit and Loss, Simple Interest and Compound Interest, Algebra
- Analytical and Logical Reasoning: Series (Number and Letter Series) (Numerical Relations and Reasoning), Coding Decoding, Data Sufficiency, Non Verbal Reasoning (Spatial Aptitude) (Spatial Reasoning) (Visual Reasoning), Directions (Direction Test), Ranking, Order and Sequence, Deductive and Inductive Reasoning (Logical Deduction and Induction) (Prepositional Reasoning), Selection Decision Table (Decision Making), Logical Sequence Of Words, Puzzle Solving (Puzzles), Syllogisms, Seating Arrangements, Calendar, Clock, Blood Relations, Cubes & Dices, Venn Diagram, Analytical Reasoning (Counting Figures Reasoning)
- Cognizant Gaming Aptitude: Gamified / Game Based Aptitude
- Java (Cluster 1): Java
- ANSI SQL MySQL (Cluster 1,2,3): SQL
- HTML, CSS, JavaScript (Cluster 1,3): HTML, CSS, JavaScript
- Python (Cluster 2): Python for Placements by Yash Sir
- Cloud Fundamentals (Cluster 2): Emerging Tech Trends
- C# (Cluster 3): C#
- OOPs: Object Oriented Programming (OOPS)
- Technical Assessment (Coding): Coding Questions by Yash Sir, C Programming by Yash Sir, Programming in C++, Pseudo Codes
- Data Structures: Introduction to DS, Array, Stack, Queue, Linked List, Tree, Graphs, Hashing
- DBMS: 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
- Operating Systems: 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
- 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, Hardware basics, Network Security, Mobile Technology, Cloud Computing and IoT, Cyber and Info Security
AI summary & chapters
AI Summary
An AI-generated summary of this video lecture.
This educational video, presented by a 'Placement Expert' from Knowledge Gate, is a C programming tutorial focused on solving algorithmic problems involving comparisons of integers. The lecture begins by introducing a problem (Q9) to find the second largest number among three given integers, providing input/output specifications and test cases. The instructor then displays a C code solution that uses nested if-else statements to compare the three numbers and determine the second largest. The logic is broken down into cases: first, it checks if the first number is the largest, then compares the other two; if not, it checks if the second number is the largest, and so on. The video transitions to a second problem (Q8) to find the smallest of four numbers, showing a different approach using a variable 'min' initialized to the first number and updated through sequential comparisons. The final segment demonstrates the code execution in an online C compiler, showing the program being compiled and run with sample inputs, confirming the correct output. The overall teaching style is direct, using a digital blackboard to write and explain code, with the instructor providing commentary throughout.
Chapters
0:00 – 2:00 00:00-02:00
The video opens with the 'Knowledge Gate' logo, followed by a slide introducing the channel's social media handles. The main content begins with a presentation slide for problem Q9: 'Find out second largest numbers of 3 numbers'. The slide details the input (three integers) and output (the second largest number) and provides two public test cases: one with inputs -4 0 4 yielding output 0, and another with 101 101 98 yielding output 101. The instructor then transitions to a code editor, displaying a C program. The code includes the standard header, a main function, and variables 'a', 'b', and 'c'. It prompts the user to 'Enter 3 numbers', reads them, and uses a complex nested if-else structure to determine the second largest. The logic first checks if 'a' is the largest, then compares 'b' and 'c' to find the second largest. If 'a' is not the largest, it checks if 'b' is the largest, and so on. The instructor explains this logic, with the code visible on the screen, and a 'Code' label in the top right corner.
2:00 – 2:38 02:00-02:38
The video transitions to a new problem, Q8: 'Find out smallest of 4 numbers (numbers are not equal)'. The slide shows the problem statement and two test cases: inputs -2 0 2 yielding output -2, and 1875 690 2017 yielding output 690. The instructor then displays a new C code snippet for this problem. The code declares four integers 'a', 'b', 'c', 'd' and a variable 'min'. It reads the four numbers and initializes 'min' to 'a'. It then uses a series of if statements to compare 'b', 'c', and 'd' with 'min', updating 'min' if a smaller number is found. The final output is the value of 'min'. The instructor explains this method of finding the minimum. The video then shows the code being executed in the 'OnlineGDB' compiler. The program is compiled successfully, and the user is prompted to 'Enter 3 numbers'. The instructor types '1 2 3' as input, and the program outputs '2', which is the second largest number, confirming the logic of the previously shown code.
The video presents a structured, step-by-step tutorial on solving two fundamental programming problems in C: finding the second largest of three numbers and the smallest of four numbers. It demonstrates two distinct algorithmic approaches: a complex, case-based logic using nested conditionals for the first problem, and a simpler, iterative method using a 'min' variable for the second. The progression from problem definition to code implementation and finally to live execution in a compiler provides a comprehensive learning experience, reinforcing the concepts of input/output, conditional logic, and variable manipulation.