Value of Operator in Pointers

preview_player
Показать описание
C Programming: Value of Operator in Pointers.
Topics discussed:
1) Use of value of operator in pointers.
2) Important points related to the value of operator in pointers.

Music:
Axol x Alex Skrindo - You [NCS Release]

#CProgrammingByNeso #CProgramming #Pointers #ValueOfOperator #PointersInC
Рекомендации по теме
Комментарии
Автор

Editing skills + programming skills + good accent = perfect learning

anuragpimpalkar
Автор

Took my professor over an hour to explain this topic, took you just over 5 minutes, and did a much better job. Thank you so much!

jonathanporter
Автор

Let's discuss all the pointer operators available in C and C++. There are two pointer operators: * and &. The & is a unary operator, called “Address of” or “Reference operator” that returns the memory address of its operand.
For example,
j = &i;
assigns the address of i into j. This address is the computer's internal location of the variable in memory. It has nothing to do with the value of i. You can think of & as returning "the address of". Therefore, the above assignment statement can be expressed as "j receives the address of i".

The second pointer operator, *, called “Value at address” or “Dereference operator” or "Indirection operator" is the complement of &. It returns the value located at the address that follows. For example, if j contains the memory address of the variable i,
k = *j;
copies the value of i into k.
Hope it helps. :)

SandipBhattacharya
Автор

One of the best explanations all over the web.

fernandosalas
Автор

I really appreciate your slight humor and the very clear diagrams! You do a great job explaining what exactly is happening in C, and not just how to code! Thank you so much!

memeingthroughenglish
Автор

Outstanding video, to the point, accurate, great pace. I used to struggle with the CONTEXT which the dereference /indirection usages for pointer initialization and you for being clear. Finally have a better understanding.

stever
Автор

Thank you sir, my college friends and I here in Portugal always rely on your videos for our exams. Great teaching!

stoopydmynd
Автор

Really great teaching now I understand pointer Tq even I can't understand in class but as watching your video I understand it better than class

Mahadeva
Автор

Took me just 5 mins to fully understand the topics, nice work Neso academy keep it up 👍👍👍

ramankumar
Автор

I wish we had Youtube back in our times. Nicely explained.

rafeeqjohn
Автор

#include <stdio.h>

int main()
{
int *ptr;
printf("%d", *ptr);

return 0;
}

Output:
Segmentation fault

A segmentation fault (aka segfault) is a common condition that causes programs to crash; they are often associated with a file named core . Segfaults are caused by a program trying to read or write an illegal memory location.

asura-
Автор

best pointers video that i have seen so far!

cindaellas
Автор

Really amazing dude
It helps me to understand the content easily
Thank you so much

nashrinfathima
Автор

Please try to upload videos daily..
Im addict to ur voice...

Moneysiva
Автор

Thanks sir it's very easy to understand the concept behind the topic thanks sir 😊😊😊

Rudhra
Автор

Great video. You explained it really well.

JamesBrodski
Автор

So, the segmentation fault occurs when accessing a portion in memory which is illegal to access, and that happens with uninitialized pointers. The question is: where is the uninitialized pointer stored in the memory layout ?

muhammadfouad
Автор

i think theres a mistake at 2:32 if you look at the example it says (int *ptr = &x;) which is wrong because it stores an address of a variable in the content of a pointer "type mismatch"

dalimh
Автор

sir when i try to assign a value to the uninitialised pointer the output i get is 2, please explain this sir
#include<stdio.h>
int main()
{
int *ptr;
*ptr = 2;
printf("%d", *ptr);
return 0;
}

output:2

modemharikumar
Автор

Sir plz make a program to check whether a given matrix is magic square or not(sum of items row wise, column wise and diagonal wise are same).
Plz sir I am waiting

Ssc_aspira