Pseudo Code Questions- Shift Operators - Tricks to Solve

Duration: 10 min

This video lesson is available to enrolled students.

Return to /learn/ACCENTURE-PREPARATION/pseudo-code/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. Behavioral Assessment (Psychometric): Behavioral Assessment (Behavioral Competency Profiling) (Psychometric Test)
  2. Cognitive Assessment (Game-Based): Gamified / Game Based Aptitude, Selection Decision Table (Decision Making), Puzzle Solving (Puzzles), Non Verbal Reasoning (Spatial Aptitude) (Spatial Reasoning) (Visual Reasoning), Analytical Reasoning (Counting Figures Reasoning), Cubes & Dices, Coding Decoding, Ranking, Order and Sequence, Series (Number and Letter Series) (Numerical Relations and Reasoning)
  3. Common Applications & MS Office (Technical Assessment): MS Office by Yash Sir
  4. Pseudo Code (Technical Assessment): Pseudo Codes
  5. Networking, Security & Cloud (Technical Assessment): 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, Emerging Tech Trends
  6. Python (Technical Assessment): Python for Placements by Yash Sir
  7. Java (Technical Assessment): Java
  8. OOPs (Technical Assessment): Object Oriented Programming (OOPS)
  9. Data Structure (Coding Round): Introduction to DS, Array, Stack, Queue, Linked List, Tree, Graphs, Hashing
  10. Algorithms (Coding Round): Algorithm Analysis, Sorting Algorithms, Greedy Algorithms, Dynamic Programming, Minimum Spanning Trees, Shortest Path Algos, Time Complexity Analysis, Advanced Algorithms
  11. Coding Assessment Questions: C Programming by Yash Sir, Coding Questions by Yash Sir, Programming in C++
  12. SQL (Coding Round): SQL
  13. JavaScript Frontend (Coding Round): JavaScript
  14. Communication Test (Basic Verbal Ability): Vocabulary, Sentence Construction, Noun, Pronoun, Verb, Tenses, Subject Verb Agreement (Verb Noun Agreement), Articles, Preposition, Conjunction, Adverb, Modals, Sentence Correction (Error Correction), Sentence Completion (Fill in the blanks), Comprehension / Reading Comprehension / Unseen Passages (Critical Reasoning) (Paragraph Questions), Communication Assessment
  15. HR Interview: MR & HR Interview Preparation
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…