Dereference or Multiply (Lots of Confusion)

Duration: 9 min

This video lesson is available to enrolled students.

Return to /learn/COGNIZANT-PREPARATION/technical-assessment/c-programming-by-yash-sir/c-language-mcqs/asset-dereference-or-multiply-lots-of-confusion after enrolling

Inside: a video lesson and guided study material.

Module outline

  1. 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
  2. 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
  3. 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)
  4. Cognizant Gaming Aptitude: Gamified / Game Based Aptitude
  5. Java (Cluster 1): Java
  6. ANSI SQL MySQL (Cluster 1,2,3): SQL
  7. HTML, CSS, JavaScript (Cluster 1,3): HTML, CSS, JavaScript
  8. Python (Cluster 2): Python for Placements by Yash Sir
  9. Cloud Fundamentals (Cluster 2): Emerging Tech Trends
  10. C# (Cluster 3): C#
  11. OOPs: Object Oriented Programming (OOPS)
  12. Technical Assessment (Coding): Coding Questions by Yash Sir, C Programming by Yash Sir, Programming in C++, Pseudo Codes
  13. Data Structures: Introduction to DS, Array, Stack, Queue, Linked List, Tree, Graphs, Hashing
  14. 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
  15. 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
  16. 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 is a lecture on C programming, specifically focusing on pointers and operator precedence. The video begins with an introduction to a multiple-choice question (MCQ) from the L&T Infotech (LTI) 2018 exam, which involves a C program with pointers. The instructor then proceeds to analyze the code line by line, using a digital blackboard to illustrate the memory layout and the values of variables. He explains the declaration of an integer variable `i` with a value of 6, a pointer `j` that is assigned the address of `i`, and a variable `k`. The core of the analysis is the `printf` statement, where the instructor breaks down the expression `i * j * i + j` by first identifying the values of `i` (6) and `j` (the address of `i`, which is 100). He then applies the rules of operator precedence, noting that multiplication has higher precedence than addition, and that the `*` operator is left-associative. The calculation is shown as `(6 * 100 * 6) + 100`, which simplifies to `3600 + 100`, resulting in an output of 3700. The video concludes with a summary table of C operators, their descriptions, and their associativity, reinforcing the concept of operator precedence.

Chapters

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

    The video opens with a title slide for a C Programming MCQs lecture by Yash Jain, featuring a glowing keyboard and a small video of the instructor. The scene transitions to a presentation slide with a large golden 'C' and a green box labeled 'POINTERS' with gears, indicating the topic. The instructor, visible in a small window, begins the lecture. The main content area then displays a C code snippet from an L&T Infotech (LTI) 2018 exam question, which includes the `#include <stdio.h>` directive, a `main()` function, and a `printf` statement with a complex expression involving pointers. The instructor starts to explain the code, focusing on the variable declarations and the `printf` function.

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

    The instructor analyzes the C code on the digital blackboard. He explains that `int i = 6;` declares an integer variable `i` with a value of 6. He then explains `*j, k;` as declaring a pointer `j` and an integer `k`. The line `j = &i;` is explained as assigning the address of `i` to the pointer `j`. The instructor draws a diagram showing `i` with a value of 6 at memory address 100, and `j` as a pointer holding the value 100 (the address of `i`). He then focuses on the `printf` statement, `printf("%d\n", i * j * i + j);`, and begins to break down the expression. He identifies the values of `i` (6) and `j` (100) and starts to calculate the result, writing `6 * 100 * 6 + 100` on the board.

  3. 5:00 – 8:53 05:00-08:53

    The instructor completes the calculation of the expression `i * j * i + j`. He applies the rules of operator precedence, stating that multiplication (`*`) has higher precedence than addition (`+`), and that the `*` operator is left-associative. He calculates `6 * 100 * 6` as `(6 * 100) * 6 = 600 * 6 = 3600`, and then adds `j` (100) to get `3600 + 100 = 3700`. He writes the final answer, 3700, on the board. The video then transitions to a summary slide that displays a table of C operators, including `()`, `->`, `++`, `*`, `+`, `<<`, and their descriptions and associativity (left to right or right to left). The instructor concludes the lesson by summarizing the key concepts of pointer arithmetic and operator precedence.

The video provides a comprehensive, step-by-step analysis of a C programming problem that tests understanding of pointers and operator precedence. It begins with a real-world exam question, then uses a clear, visual approach to deconstruct the code. The instructor effectively uses a digital blackboard to illustrate the memory model, showing how a pointer holds the address of a variable. The core of the lesson is the application of operator precedence rules to evaluate a complex expression, demonstrating that multiplication is performed before addition and that the `*` operator is left-associative. The final summary table reinforces the foundational knowledge of C operators, making the video a valuable resource for students preparing for programming exams.

Loading lesson…