Pseudo Code Questions- Shift Operators - Tricks to Solve

Duration: 10 min

This video lesson is available to enrolled students.

Return to /learn/LTI-MINDTREE-PREPARATION/coding/pseudo-codes/pseudo-code-by-yash-sir/asset-pseudo-code-questions-shift-operators-tricks-to-solve after enrolling

Inside: a video lesson and guided study material.

Module outline

  1. English Comprehension/Verbal Ability: Comprehension / Reading Comprehension / Unseen Passages (Critical Reasoning) (Paragraph Questions) Vocabulary Sentence Correction (Error Correction) Sentence Completion (Fill in the blanks) Sentence Re-arrangements (Para Jumbles) (Narrative Sequencing) Subject Verb Agreement (Verb Noun Agreement) Tenses Verb Articles Preposition Conjunction Pronoun Noun Adjectives Adverb Modals Cloze Test (Cloze Passage) Active Passive Voice (Voice) Direct and Indirect Speech Sentence Construction
  2. Logical Ability: Coding Decoding Directions (Direction Test) Analogy Inequality Data Sufficiency Series (Number and Letter Series) (Numerical Relations and Reasoning) Syllogisms Seating Arrangements Puzzle Solving (Puzzles) Blood Relations Deductive and Inductive Reasoning (Logical Deduction and Induction) (Prepositional Reasoning) Ranking, Order and Sequence Logical Sequence Of Words Data Arrangement Venn Diagram Calendar Clock
  3. Quantitative Ability: Logarithm Permutation and Combination Probability Profit and Loss Speed Time and Distance Mixture and Alligation Partnership Simple Interest and Compound Interest Percentage Ratio and Proportion (Ratios) Average Time and Work Pipe and Cistern Number System Divisibility Rules HCF LCM Algebra Powers and Exponents (Surds and Indices) Mensuration and Geometry Age Problems Data Interpretation Sequence and Series (Series)
  4. Basic Analytical Ability: Non Verbal Reasoning (Spatial Aptitude) (Spatial Reasoning) (Visual Reasoning) Analytical Reasoning (Counting Figures Reasoning) Cubes & Dices Selection Decision Table (Decision Making)
  5. Computer Programming: Pseudo Codes Coding Questions by Yash Sir C Programming by Yash Sir Programming in C++ Java Python for Placements by Yash Sir
  6. DBMS (Computer Science): Basics of DBMS ER Diagram Relational Model & Functional Dependencies Keys & Integrity Constraints Normalization (1NF - BCNF) Transaction Management Concurrency Control Database Security & Authorization
  7. SQL (Computer Science): SQL
  8. OS (Computer Science): Introduction to OS Process Management CPU Scheduling Deadlock Process Synchronization Threads & Process Creation Memory Management Virtual Memory File Management
  9. Computer Networks (Computer Science): 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
  10. Data Structures (Computer Science): Introduction to DS Array Stack Queue Linked List Tree Graphs Hashing
  11. OOPs (Computer Science): Object Oriented Programming (OOPS)
  12. Software Engineering (Computer Science): Fundamentals of Software Engineering Software Requirements and Quality Assurance Software Design, Estimation and Metrics Software Testing Software Maintenance and Configuration Management
  13. SVAR Conversational - Spoken English: Communication Assessment
  14. HR Interview: MR & HR Interview Preparation
  15. Coding Practice Questions: Coding Questions Bank
AI summary & chapters

AI Summary

An AI-generated summary of this video lecture.

This educational video is a lecture on solving multiple-choice questions (MCQs) related to pseudo code, focusing on integer arithmetic and bitwise operations. The instructor, Yash Jain, presents three distinct problems, each from a different company's exam (Capgemini, Accenture, Adobe). The first problem involves integer division and a left shift operation, where the output is calculated as 64. The second problem demonstrates a loop that doubles a value until it exceeds a limit, resulting in an output of 64. The third problem features a for loop that iterates from 0 to 3, summing the loop variable, which yields an output of 6. The video uses a digital blackboard for step-by-step calculations and includes a live coding demonstration in an online C compiler to verify the results. The lecture concludes with the instructor speaking directly to the camera.

Chapters

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

    The video opens with a title slide for a lecture on "PSEUDO CODE MCQs" by Yash Jain. The instructor then presents the first problem, which is from Capgemini 2020. The pseudo code is displayed on a digital blackboard: it declares three integer variables (x, y, z), sets x=24 and y=8, performs integer division x = x/y (resulting in x=3), and then calculates z = y << x (a left shift operation). The instructor begins to solve the problem by writing the initial values and the division step, showing x = 24 / 8 = 3.

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

    The instructor continues solving the first Capgemini problem. He explains the left shift operation, writing the formula z = y << x, which is equivalent to z = 8 << 3. He then calculates this as 8 * 2^3, which is 8 * 8 = 64. He writes the final answer, z = 64, on the board. The video then transitions to a live coding environment, the OnlineGDB, where the C code corresponding to the pseudo code is shown. The instructor runs the code, and the output displayed in the console is 64, confirming the manual calculation.

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

    The video moves to the second problem, from Accenture 2017. The pseudo code is shown: it initializes value=1 and n=45, then enters a while loop that continues as long as value <= n. Inside the loop, value is updated to value << 1 (i.e., value = value * 2). The instructor walks through the iterations: value starts at 1, then becomes 2, 4, 8, 16, 32. The next iteration would make it 64, which is greater than 45, so the loop terminates. The final value of the variable is 64, which is printed. The instructor then demonstrates this in the OnlineGDB compiler, where the output is again 64.

  4. 10:00 – 10:18 10:00-10:18

    The video presents the third and final problem, from Adobe 2016. The pseudo code shows a for loop: for i from 0 to 4<<0 (which is 4). The loop variable i takes values 0, 1, 2, 3. The variable count is initialized to 0 and is incremented by i in each iteration. The instructor calculates the sum: 0 + 1 + 2 + 3 = 6. The final output is 6. The video then cuts to the instructor speaking directly to the camera, concluding the lecture.

The video provides a structured, step-by-step analysis of three different pseudo code MCQs, each illustrating a core programming concept. The first problem demonstrates integer division and the left shift operator, which is a fundamental bit manipulation technique. The second problem reinforces the concept of a while loop and the exponential growth of a variable through repeated multiplication by two. The third problem focuses on a for loop and the summation of a sequence of numbers. The consistent use of a digital blackboard for manual calculation and a live coding environment for verification ensures a comprehensive understanding of the logic and the final output for each problem.

Loading lesson…