Популярное

Музыка Кино и Анимация Автомобили Животные Спорт Путешествия Игры Юмор

Интересные видео

2025 Сериалы Трейлеры Новости Как сделать Видеоуроки Diy своими руками

Топ запросов

смотреть а4 schoolboy runaway турецкий сериал смотреть мультфильмы эдисон
dTub
Скачать

Pointers as function Arguments || Lesson 62 || C Programming || Learning Monkey ||

Автор: Wisdomers - Computer Science and Engineering

Загружено: 2021-07-19

Просмотров: 11555

Описание:

Pointers as function Arguments

In this class, we will understand the use of Pointers as function Arguments.

We have clearly understood the concepts of pointer variables and the visualization of pointers.
Pointers as function Arguments

So far, we have understood what pointers are, but we haven’t understood the use of pointers.

There are many uses of the pointers in c programming.

One of the important use of pointers is passing them as the function arguments.

We will try to understand the use of passing the arguments of the functions as pointers using the swapping the values of a variable example.

The image below shows the use of arguments as values, NOT as pointers.

The objective above program is to swap the values of i and j.

As we pass the values of arguments as values in the swap function, i and j will get assigned to x and y.

With this assignment, we will lose the connectivity of ‘i’ and j.

The swap function will swap the values of x and y but not the i and j.

With this way of function call, we can not swap the values of i and j.

The image below is the program for swapping the values with arguments as address.


In the above program, the swap function calls have the address of the variables i and j.

In the function definition, the parameters x and y are the pointers to store the ‘address of’ variables i and j.


Now the swap function swaps the values i and j as we pass the references of the variables i and j.

#learningmonkey #cprogrammingforbeginners #placements #gatecse #cprogramming #cprogramminglanguage


Link for playlists:
   / @wisdomerscse  


Link for our website: https://learningmonkey.in

Follow us on Facebook @   / learningmonkey  

Follow us on Instagram @   / learningmonkey1  

Follow us on Twitter @   / _learningmonkey  

Mail us @ [email protected]

Pointers as function Arguments || Lesson 62 || C Programming || Learning Monkey ||

Поделиться в:

Доступные форматы для скачивания:

Скачать видео mp4

  • Информация по загрузке:

Скачать аудио mp3

Похожие видео

Pointers as function arguments - call by reference

Pointers as function arguments - call by reference

Pointers and Strings in C || Lesson 69 || C Programing || Learning Monkey ||

Pointers and Strings in C || Lesson 69 || C Programing || Learning Monkey ||

Structs (Structures) in C - An Introductory Tutorial on typedefs, struct pointers, & arrow operator

Structs (Structures) in C - An Introductory Tutorial on typedefs, struct pointers, & arrow operator

C_101 Function Pointers in C | Pointer to Function | C Programming Tutorials

C_101 Function Pointers in C | Pointer to Function | C Programming Tutorials

Arrays and for Loops in C || Lesson 45 || C Programming || Learning Monkey ||

Arrays and for Loops in C || Lesson 45 || C Programming || Learning Monkey ||

Почему строки указателей в C неизменяемы?

Почему строки указателей в C неизменяемы?

Pointers in C / C++ [Full Course]

Pointers in C / C++ [Full Course]

C_96 Passing Array as an Argument to a Function in C | C Language Tutorials

C_96 Passing Array as an Argument to a Function in C | C Language Tutorials

Call By Value & Call By Reference in C

Call By Value & Call By Reference in C

Structure Pointer and Arrow Operator | C Language Tutorial

Structure Pointer and Arrow Operator | C Language Tutorial

63 - POINTERS PASSING AS ARGUMENTS TO FUNCTIONS - C PROGRAMMING

63 - POINTERS PASSING AS ARGUMENTS TO FUNCTIONS - C PROGRAMMING

СРОЧНО! КУЧЕР:

СРОЧНО! КУЧЕР: "Это просто позор". Что случилось на пресс-конференции Трампа и Зеленского

Array of Strings in C || Lesson 70 || C Programming || Learning Monkey ||

Array of Strings in C || Lesson 70 || C Programming || Learning Monkey ||

Function Pointers in C

Function Pointers in C

Understanding the Dangling Pointers

Understanding the Dangling Pointers

array of pointers in c programming | Example | C Programming | Lec-47

array of pointers in c programming | Example | C Programming | Lec-47

Они унизили уборщика — и поплатились за это | Розыгрыш в спортзале от Анатолия № 57

Они унизили уборщика — и поплатились за это | Розыгрыш в спортзале от Анатолия № 57

C_82 What is Dangling pointer in C | C Language Tutorials

C_82 What is Dangling pointer in C | C Language Tutorials

Взаимосвязь между указателями и массивами в языке C: объяснение (A[i] против *(A+i)) | Программир...

Взаимосвязь между указателями и массивами в языке C: объяснение (A[i] против *(A+i)) | Программир...

Pointers in c programming | Arrays | Programming Example | C Programming | Lec-46

Pointers in c programming | Arrays | Programming Example | C Programming | Lec-46

© 2025 dtub. Все права защищены.



  • Контакты
  • О нас
  • Политика конфиденциальности



Контакты для правообладателей: [email protected]