Products
Features
YouTube Video Summarizer
Summarize YouTube videos
Web & PDF Highlighter
Highlight web pages & PDFs
Chat with PDF
Ask any PDF questions with AI
Ask AI Clone
Chat with your highlights & memories
Audio Transcriber
Transcribe audio files to text
Glasp Reader
Read and highlight articles
Kindle Highlight Export
Export your Kindle highlights
Idea Hatch
Hatch ideas from your highlights
Integrations
Obsidian Plugin
Notion Integration
Pocket Integration
Instapaper Integration
Medium Integration
Readwise Integration
Snipd Integration
Hypothesis Integration
Apps & Extensions
Chrome Extension
Safari Extension
Edge Add-ons
Firefox Add-ons
iOS App
Android App
Discover
Discover
Ideas
Discover new ideas and insights
Articles
Curated articles and insights
Books
Book recommendations by great minds
Posts
Essays and notes from readers
Quotes
Inspiring quotes collection
Videos
Curated videos and summaries
Explore Glasp
Glasp Newsletter
Weekly insights and updates
Glasp Talk
Interview series with great minds
Glasp Blog
Latest news and articles
Glasp Use Cases
Learn how others use Glasp
Build & Support
Glasp API
Access Glasp's API for developers
MCP Connector
Connect Glasp to Claude & ChatGPT
Community
Glasp Reddit Community
Students
Student discount and benefits
FAQs
Frequently Asked Questions
AboutPricing
DashboardLog inSign up

Call by Address Example 2| Pointers in C | Data Structure Using C

29 views
•
April 30, 2022
by
Ekeeda
YouTube video player
Call by Address Example 2| Pointers in C | Data Structure Using C

TL;DR

A program is explained that demonstrates the concepts of call by address and call by value, using pointers and integer parameters.

Transcript

hello dear students let's see one more example program which will explain call by address and call by value now notice in this program we have been given a function f1 again where the first parameter is a pointer but the second parameter is not a pointer it is a simple integer pointer so it is but obvious that the first parameter will always receiv... Read More

Key Insights

  • 👻 Call by address involves passing the address of a variable, allowing modifications to be made to the original variable.
  • 🧭 Call by value involves passing the value of a variable, creating a copy of the original variable.
  • ❓ Modifying a pointer in a function will affect the original variable, but modifying an integer parameter will not.
  • ❤️‍🩹 When a function ends, the parameters created inside the function are destroyed.
  • ❣️ The values of x and y in the main function are not affected by the modifications made inside the function.
  • 🏪 Pointers can store addresses of variables, while integer parameters can store values of variables.
  • ❓ The output of the program depends on the concepts of call by address and call by value.

Install to Summarize YouTube Videos and Get Transcripts

Explore YouTube Video Summarizer or Get YouTube Transcript Extractor

Questions & Answers

Q: What is the difference between call by address and call by value?

Call by address involves passing the address of a variable, while call by value involves passing the value of a variable. In call by address, any changes made to the variable inside the function will affect the original variable. In call by value, changes made inside the function will not affect the original variable.

Q: How does the program handle the first call to the function?

In the first call, the address of x is passed as the first parameter, and the value of y is passed as the second parameter. Inside the function, the pointer p1 will point to the address of x, while the integer parameter p2 will store the value of y. The values of x and y are then modified independently.

Q: What happens when the function ends?

When the function ends, the parameters p1 and p2 are destroyed. The program returns to the main function with the updated values of x and y. Any changes made to p1 and p2 inside the function will not affect the values of x and y in the main function.

Q: How does the program handle the second call to the function?

In the second call, the address of y is passed as the first parameter, and the value of x is passed as the second parameter. Similar to the first call, p1 will point to the address of y, and p2 will store the value of x. The values of y and x are then modified independently.

Summary & Key Takeaways

  • The program demonstrates call by address and call by value, with the first parameter receiving an address and the second parameter receiving a value.

  • The values of x and y in the main function are 10 and 20, respectively.

  • The program shows how the values of x and y are affected when passed to the function using call by address and call by value.


Read in Other Languages (beta)

English

Share This Summary 📚

Summarize YouTube Videos and Get Video Transcripts with 1-Click

Download browser extensions on:

Try YouTube Summary with ChatGPT & Claude or YouTube Transcript Generator

Explore More Summaries from Ekeeda 📚

Non   Homogeneous Linear Equations with Constant Coefficients thumbnail
Non Homogeneous Linear Equations with Constant Coefficients
Ekeeda
Darcy's Law and Duipits Theory -  Ground Water and Well Hydraulics - Water Resource Engineering 1 thumbnail
Darcy's Law and Duipits Theory - Ground Water and Well Hydraulics - Water Resource Engineering 1
Ekeeda
Transient Response and Steady State Error Problem 1 - Time Response Analysis - Control Systems thumbnail
Transient Response and Steady State Error Problem 1 - Time Response Analysis - Control Systems
Ekeeda
Characteristics of Good Stone thumbnail
Characteristics of Good Stone
Ekeeda
Software Testing and Quality Assurance - Agile Testing | 12 November | 6 PM thumbnail
Software Testing and Quality Assurance - Agile Testing | 12 November | 6 PM
Ekeeda
Introduction to Simple Machines - Simple Machines - Engineering Mechanics thumbnail
Introduction to Simple Machines - Simple Machines - Engineering Mechanics
Ekeeda

Summarize YouTube Videos and Get Video Transcripts with 1-Click

Download browser extensions on:

Try YouTube Summary with ChatGPT & Claude or YouTube Transcript Generator

Apps & Extensions

  • Chrome Extension
  • Safari Extension
  • Edge Add-ons
  • Firefox Add-ons
  • iOS App
  • Android App

Key Features

  • YouTube Video Summarizer
  • Web & PDF Summarizer
  • Web & PDF Highlighter
  • Chat with PDF
  • Ask AI Clone
  • Audio Transcriber
  • Glasp Reader
  • Kindle Highlight Export
  • Idea Hatch

Integrations

  • Obsidian Plugin
  • Notion Integration
  • Pocket Integration
  • Instapaper Integration
  • Medium Integration
  • Readwise Integration
  • Snipd Integration
  • Hypothesis Integration

More Features

  • APIs
  • MCP Connector
  • Blog & Post
  • Embed Links
  • Image Highlight
  • Personality Test
  • Quote Shots

Company

  • About us
  • Blog
  • Community
  • FAQs
  • Job Board
  • Newsletter
  • Pricing
Terms

•

Privacy

•

Guidelines

© 2026 Glasp Inc. All rights reserved.