ycliper

Популярное

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

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

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

Топ запросов

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

Pointers in C : Example 7

if else

c basic concept

static scoping

dynemic scoping

scoping

programming concept

gate

gate cse

POINTERS

POINTERS IN C

STRUTURE

STRUTURE IN C PROGRAMMING LANGUAGE

POINTERS WITH ECAMPLE

GATE CSE VEDIOS

GATE CSE VIDEOS

COMPUTER SCIENCE

GATE COATCHING

BEST GATE CSE LECTURES ONLINE

BASIC PROGRAMMING WITH EXAMPLE

BEST PROGRAMMING EXAMPLE

POINTERS CONCEPTS

EXAMPLE CSE

GATE PREVIOUS CSE PREVIOUS GATE SOLVES QUESTIONS IN CSE

Автор: focal point

Загружено: 2020-08-26

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

Описание: A pointer is a VARIABLE. Pointers store the address of variables or a memory location.

#GATE_2021, #GATE , #GATE_PREPARATION

GENERAL SYNTAX::
datatype *var_name;

EXAMPLE::
int *ptr;

To use pointers in C, we must understand below two operators.

To access the address of a variable to a pointer, we use the unary operator & (ampersand) that returns the address of that variable. For example, &x gives us the address of variable x.

One more operator is unary * (Asterisk) which is used for two things :
To declare a pointer variable: When a pointer variable is declared in C, there must be a * before its name.
To access the value stored in the address we use the unary operator (*) that returns the value of the variable located at the address specified by its operand. This is also called Dereferencing.


POINTER EXPRESSION AND POINTER ARITHMETIC
A limited set of arithmetic operations can be performed on pointers. A pointer may be:

incremented ( ++ )
decremented ( — )
an integer may be added to a pointer ( + or += )
an integer may be subtracted from a pointer ( – or -= )

Pointer arithmetic is meaningless unless performed on an array.
Note: Pointers contain addresses. Adding two addresses makes no sense because there is no idea what it would point to.
Subtracting two addresses lets you compute the offset between these two addresses.



ARRAY NAME AS POINTER
An array name acts like a pointer constant. The value of this pointer constant is the address of the first element.
For example, if we have an array named val then val and &val[0] can be used interchangeably.

BENEFITS OF USING POINTERS
Pointers are more efficient in handling Arrays and Structures.
Pointers allow references to function and thereby helps in the passing of function as arguments to other functions.
It reduces the length of the program and its execution time as well.
It allows C language to support Dynamic Memory management.

#GATE_2021, #GATE , #GATE_PREPARATION , #focalpoint , #gateexam, #gate_cs , #focalpoint , #gateexam , #gate_cse

Gate cse videos

Не удается загрузить Youtube-плеер. Проверьте блокировку Youtube в вашей сети.
Повторяем попытку...
Pointers in C : Example 7

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

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

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

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

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

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

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



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



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