My Rules of understanding pointers:- '&' - this will return an address of any variable or things. '*' - this will dereference an address 'int *' - this will make a pointer variable 'variable_name' - this will return value of a 'variable_name' Extra:- swap(a,b) - Call by value swap(&a,&b) - Call by reference
any data type with star will make a pointer variable which can be used to address a memory location containing data of same data type as pointer@@herohera3497
*a++ karne se 2 hi aa rha he par *a += 1 karne se kaam de raha he aur 3 aa rha he, koi agar comment padh raha he to please bata do ye kyun ho raha he please.
@@ujjwalrockriser Dekho! Hum pointers address store karne ke liye use karte hai! So Jab tum address ko baghaoge i.e. *a++ karoge toh tumhara address next jagah par point karega jaha par kuch nahi hai. and jab tum *a+=1 karte ho tab address nahi increment hota hai, tab a par joh element hai usme 1 add hota hai! bcz jab hum *a++ karte hai tab memory address +2 se badhta hai, and jab hum *a+=1 karte hai tab woh element me 1 add hota hai. Samjhe?
@@ujjwalrockriser *a++ ki jagah (*a)++ try krke dekho, mera *a++ se nhi hua tha lekin brackets se kaam krgea,... ab bina brackets k kaam naah krne ka kaarn to meko bhi smjh nhi aaya, aapko smjh aaye to btaana
The point is we can't increment the pointer directly as *a++; It'll still print a=2 but using (*a)++; gives the incremented value It is somewhat similar to BODMAS rule. We need to dereference the pointer a then increment it Thank me later!
*a++ karne se 2 hi aa rha he par *a += 1 karne se kaam de raha he aur 3 aa rha he, koi agar comment padh raha he to please bata do ye kyun ho raha he please.
@@ujjwalrockriser are bro aisa isliye hai kyunki *a++ karne pe '++' operator ki precendence zyada hoti hai '*' se to vo address ka increment kar deta hai phir uss increased address ko dereference karta hai jisse apna original a same hi rehta hai iss issue ko solve karne ke liye apan ko bas (*a)++ ye likhna hai jisse pehle dereference ho phir increment
I don't know why people hate this kind of videos when someone is working so hard doing animation, writing the script, notes, editing the videos etc...etc... for your sake! Why can't we appreciate their work which has a huge impact on our society!!!
brother you are absolutely right, but also try to understand that if you are an absolute beginner, then did you understand? a big NO, so that's why some beginners didn't liking it!
@@harshhingu3082 stock management, seminars in diff collages, affiliated marketing and much more... Our aman bhaiya is all rounder 😎 Their annual income is 7Cr (some plus students were discussing this in comments session)
a BIG Thanks to Aman SIr & there Team !! Such a Great Efforts for student's who can't afford colleges or classes without showing any add's between the video
In my opinion, you're the best teacher on Apna College! ( No offense to other teachers, everyone's doing a great job, it's just my personal opinion, I am a slow learner)
If anyone is facing any problem, this can be because ++ has equal precedence with the * and the associativity is right-to-left. You can use ++*a or (*a)++ to specify the order of evaluation.
The point is we can't increment the pointer directly as *a++; It'll still print a=2 but using (*a)++; gives the incremented value. *a++ - Post Increment Operator, it first assigns the value and then increases the value later on. If we use ++*a - Pre Increament Operator, then it increase the value first and then assigns the value later on. So on using ++(*a) will give you the correct answer. Thanks !!
Program to Increment variable using Pointers:- #include using namespace std; void increment(int *a){ (*a)++; } int main(){ int a=2; increment(&a); cout
*Program to Increment variable using Pointers: #include using namespace std; void increment(int *x); int main() { int x = 2; increment(&x); //Pass by Reference cout
One more easy Way to call #include using namespace std; void Swap(int &a,int &b){ int temp = a; a = b; b = temp; } int main(){ int a = 3, b = 5; Swap(a, b); cout
I apologize for any confusion, but the program you provided is an example of 'pass by address,' not 'pass by reference,' as it's important to use the correct terminology in programming.
19:00 apne wnha addresses bheje hain pointer variable k is liy argument variable wnha pointer type k honge to accept the address coming from function call.
14:10 agar int type ki function banna kar return a kara lein aur value ko again a me store kar lein tab toh baat ban jaayegi na?? int increment(int a){ a++; return a; } a = increment(a);
No you can't use *ptr = &a as it is different. In Int *ptr , *ptr is no a variable only ptr is a variable. U can also write it as int** ptr. Int* is not integer data type, it is a integer type data type for storing address of a int variable.
A much simpler approach #include using namespace std; void swap(int& a, int& b){ int temp = a; a=b; b=temp; } int main() { int a=2; int b=4; swap(a,b); cout
Mam jab aap pointer pass kar rahe as an argument then receive karne wala phir double pointer hoga **p so aapne example ke time q nahi liya and output sahi kaise aaya phirbhi?👍
Those pointers are containing the addresses of variables, so whether you pass addresses or pass pointers itself since an indirection operator is used so there is no problem.
@@rameshmalhotra9525 bro 11 months have passed for that comment, I have already passed that phase of learning. Their is no need to suggest me any video. Also she did not teach well for new learners
My Rules of understanding pointers:-
'&' - this will return an address of any variable or things.
'*' - this will dereference an address
'int *' - this will make a pointer variable
'variable_name' - this will return value of a 'variable_name'
Extra:-
swap(a,b) - Call by value
swap(&a,&b) - Call by reference
Thank you so much!!
char* can also make pointer variable.
any data type with star will make a pointer variable which can be used to address a memory location containing data of same data type as pointer@@herohera3497
@@herohera3497 char *
Pointers Concept - 0:10
Pointer Arithmetic - 4:10
Pointers and arrays - 6:29
Pointer to pointer - 11:00
Passing pointer to function - 12:55
*a++ karne se 2 hi aa rha he par *a += 1 karne se kaam de raha he aur 3 aa rha he, koi agar comment padh raha he to please bata do ye kyun ho raha he please.
@@ujjwalrockriser Dekho! Hum pointers address store karne ke liye use karte hai! So Jab tum address ko baghaoge i.e. *a++ karoge toh tumhara address next jagah par point karega jaha par kuch nahi hai.
and jab tum *a+=1 karte ho tab address nahi increment hota hai, tab a par joh element hai usme 1 add hota hai! bcz jab hum *a++ karte hai tab memory address +2 se badhta hai, and jab hum *a+=1 karte hai tab woh element me 1 add hota hai.
Samjhe?
@@ujjwalrockriser *a++ ki jagah (*a)++ try krke dekho, mera *a++ se nhi hua tha lekin brackets se kaam krgea,... ab bina brackets k kaam naah krne ka kaarn to meko bhi smjh nhi aaya, aapko smjh aaye to btaana
@@sanyamratreja5457 bhai ye comment ke liye tarash gaya tha
@@shreyaschavhan5522 achha to ye baat he
Thank you bro
The point is we can't increment the pointer directly as *a++;
It'll still print a=2 but using (*a)++; gives the incremented value
It is somewhat similar to BODMAS rule. We need to dereference the pointer a then increment it
Thank me later!
Thanks Bro....
Thank you so much
thanks bhai bhot der se pareshan tha iske liye
thanks buddy!
thx
This has become a part of my daily schedule
*a++ karne se 2 hi aa rha he par *a += 1 karne se kaam de raha he aur 3 aa rha he, koi agar comment padh raha he to please bata do ye kyun ho raha he please.
@@ujjwalrockriser call by reference dekh lo aa jayega smz
@@monu_7712 samjha nahi
Same Problem
@@ujjwalrockriser are bro aisa isliye hai kyunki *a++ karne pe '++' operator ki precendence zyada hoti hai '*' se to vo address ka increment kar deta hai phir uss increased address ko dereference karta hai jisse apna original a same hi rehta hai
iss issue ko solve karne ke liye apan ko bas (*a)++ ye likhna hai jisse pehle dereference ho phir increment
I don't know why people hate this kind of videos when someone is working so hard doing animation, writing the script, notes, editing the videos etc...etc... for your sake! Why can't we appreciate their work which has a huge impact on our society!!!
brother you are absolutely right, but also try to understand that if you are an absolute beginner, then did you understand? a big NO, so that's why some beginners didn't liking it!
@@akash- grammar pro max ultra op bro
@@akash- i understood it tho
ruclips.net/video/5FsIa4Mp3ho/видео.html
ruclips.net/video/QTaiF8N6i3Y/видео.html
Why you remove all adds we don't want to learn by making anyone financially weak please bro you can add adds and also sponsership
dont worry about his finances he manages it well enough.... not being a hater of him ,, subscribed him for a long time
@@devplays3200 what are the other things he does to earn money do you know.I am just asking
@@devplays3200 bro I am just saying him that there is no need to compromise at all no one is getting angry for any add
@@harshhingu3082 stock management, seminars in diff collages, affiliated marketing and much more... Our aman bhaiya is all rounder 😎
Their annual income is 7Cr (some plus students were discussing this in comments session)
@@shlokhinge3179 he doesn't charge any penny for seminars, don't spread rumors
Sach me ammman sir pagal ho gya hoon me padh ke aisa content koi nhi dega paise le ker bhi love you sir💕🤘😊
Hmm
Hitler reacting to IIT-JEE RESULTS -- ruclips.net/video/EioB3UK6IRM/видео.html
ruclips.net/video/5FsIa4Mp3ho/видео.html🙏🏻
a BIG Thanks to Aman SIr & there Team !!
Such a Great Efforts for student's who can't afford colleges or classes
without showing any add's between the video
clg mein samaj nhi aaya par hyaa pe smj aaya actually jab live code example dete hai taab smj ata hai thanks so much
#include
Using namespace std;
Int swap(int &a,int &b){
Int temp ;
Temp = a ;
a = b ;
b = temp ;
};
Int main(){
Int a = 5 ;
Int b = 10 ;
Cout
Noo
@@pavansai1895 and why ?
In my opinion, you're the best teacher on Apna College! ( No offense to other teachers, everyone's doing a great job, it's just my personal opinion, I am a slow learner)
This video's spoken accent is so strong in Indian English that it detracts from learning.
Pls provide us some extra questions sheet for each lecture .
By the way you and your team is doing great work .
STAND UP WE NEED {PYTHON}
Hitler reacting to IIT-JEE RESULTS -- ruclips.net/video/EioB3UK6IRM/видео.html
@@QWERTY-135 jo mil raha wo le le phle 🤣🤣🤣🤣🤣
ruclips.net/video/5FsIa4Mp3ho/видео.html
ruclips.net/video/5FsIa4Mp3ho/видео.html
no one never ever explained something like the way you explained hats off 👌💯
Don't get for what I was searching for... but really impressed by your way of teaching its awesome Ma Sha Allah 👍🏻💫
Please post at least 2 videos per day if possible 🙏 Either way I am blessed to get such amazing tutorials for free
ruclips.net/video/PbcUrsLTDF4/видео.html
Haath bhi jodte hoo aur bhik bhi maangte hoo🤣🤣🤣🤣
@@debiprasannapattanaik8294Apne Guru ke samne hath jodke bhik mangne me kya hi bura hai
Your videos are extremely helpful thanks a lot to everyone who gave their time, effort and money to make these videos ❤️.
Is playlist mai dsa bhi krwaya hai?
If anyone is facing any problem, this can be because ++ has equal precedence with the * and the associativity is right-to-left. You can use ++*a or (*a)++ to specify the order of evaluation.
this should be pinned. now i realize how many actually code and how many simply watch the video.
Thanks bhaiya.
Thanks a lot Buddy.😄
this was much needed...thank you so much pal!
@@unnatisingh7612 Thank you so much for going out of your way and commenting this. I was having a really bad day and it really cheered me up!
@@sourabhjain8102 it was my immense pleasure to hear that!!...
Keep going buddy !
Very useful video it clear my doubt of pointers
amazing explaination mam, thankyou soo much .
i think first time i really understood the concept calling by-value and by-reference .
Acchaaa
Meri pyari sister.... I am totally jelesh... Your voice because, your voice is amazing😘😘😘😘 Shreya singh
This channel deserves more subscribers ❤️🔥
The point is we can't increment the pointer directly as *a++;
It'll still print a=2 but using (*a)++; gives the incremented value.
*a++ - Post Increment Operator, it first assigns the value and then increases the value later on.
If we use
++*a - Pre Increament Operator, then it increase the value first and then assigns the value later on.
So on using ++(*a) will give you the correct answer.
Thanks !!
Di mza aa gya , now the speed of teaching is very good. I'm loving it. Thanks di and Aman bhiya ❤
Thanks ma'am, for covering the complete pointer in one video!
When God come to help poor students ❤️
@Raunak Singh lol, usko free nahi piracy bolte he. Thats why vo telegram par he aur ye YT.
@Raunak Singh where?
@Raunak Singh kaha free course h plzz help 🙏🙏
ruclips.net/video/5FsIa4Mp3ho/видео.html
"Aya samajh me thoda thoda was so sweet mam"🤗
haha true
Pointer to pointer to pointer to pointer....
Inception at max level
Dii even though other teachers are good too but i understand each topic the most when you explain it. thank you so much
we want SHARDHA DEDI in this video to teach this topic please please
THUMBS UP WHO AGREE
i am seriously wanting this video and a great thanks to all the team and didi for this video ♥♥
Thanks for ur hardwork. The way u explained it's the easier way .
Shruti didi always explain is very good 👍❤️❤️
Thnku dii bhut acha smjhaya apne 👍👍
Loved her work
Like👍👍👍
Best video ever on pointer
didi your the best teacher in the world lots of love ❤❤❤❤❤❤❤❤❤❤❤🙏
Great video, first time in my life I understand the concept of pointers. Thank you so much :D
Pehli baar pointer ka video dekho gee toh pehli baar hi samjhoge naa
Program to Increment variable using Pointers:-
#include
using namespace std;
void increment(int *a){
(*a)++;
}
int main(){
int a=2;
increment(&a);
cout
thanks bro
thanks
this is the most amazing explanation I have ever seen on pointers.
thanks team
Is it just me who can't access to the links given in pdf or they actually ain't link?
*Program to Increment variable using Pointers:
#include
using namespace std;
void increment(int *x);
int main()
{
int x = 2;
increment(&x); //Pass by Reference
cout
Bro smj nhi aaya
One more easy Way to call
#include
using namespace std;
void Swap(int &a,int &b){
int temp = a;
a = b;
b = temp;
}
int main(){
int a = 3, b = 5;
Swap(a, b);
cout
Great brother for self taught students
Hitler reacting to IIT-JEE RESULTS -- ruclips.net/video/EioB3UK6IRM/видео.html
thankyou di❤❤ finally i understand pointer
Awesome Work by Aman dhattarwal sir .
12:32 didi boht sundar hai aapki hadwriting....meri itni dangerous hai ki 5 marks for extra dark handwriting kat jaate the mere school mein
this is prolly the best explanation for pointer
Pdhane k sath sath communication sounds bhot accha h
I apologize for any confusion, but the program you provided is an example of 'pass by address,' not 'pass by reference,' as it's important to use the correct terminology in programming.
This is really good leacture gjb💥🔥
19:00 apne wnha addresses bheje hain pointer variable k is liy argument variable wnha pointer type k honge to accept the address coming from function call.
Thanks Aman for the quality content and Thanks for the crystal clear explanation Urvi. 👍
good work sister ...your work is good .i impress it . yo u take deeep working
Thanku soo much Aman Bhaiya ji 🤗 & Ma'am ji
she sounds so clear to me!
Sir STL, vector aur c++ competitive programming par video kab aayege
Advance 5 million congratulations
Sir, your team skip string topic according your timeline of c++ pdf
Hitler reacting to IIT-JEE RESULTS -- ruclips.net/video/EioB3UK6IRM/видео.html
@@beastman1927 Coding ninja ki course free mein mili hai?
@@beastman1927 Bata bro, did u get it in free or it is a paid course?
@@beastman1927 its the first lesson and pointer will be covered in most extensive way.
@@SastaDopamines no bro coding ninjas charge a lot
Didi arithmetic pointer main char ka increments main toh koi ajeeb se symbols aa gaye mere toh ??
very well Mam! amaing and effective learning video.
Ma'am ek number samjhaya
14:10 agar int type ki function banna kar return a kara lein aur value ko again a me store kar lein tab toh baat ban jaayegi na??
int increment(int a){
a++;
return a;
}
a = increment(a);
Thank You so much bhaiya...and whole ApnaCollegeTeam
One notable point is that
1. int *ptr=&a;
2. *ptr=&a;
Here line 1 and 2 is not same thing
Right
@@jimcheriyan1801 what's the difference?
@@it41tanmayaron26 1 is correct bcuz we hav t o declare pointers type too
No you can't use *ptr = &a as it is different.
In Int *ptr , *ptr is no a variable only ptr is a variable. U can also write it as int** ptr.
Int* is not integer data type, it is a integer type data type for storing address of a int variable.
@@TricknologyHub ok, so 2nd is wrong
Really very informative video. Thank you for putting the efforts :)
This is what kind of lessons I always want.
finally, understood the pass-by reference concept functionality.
didi kya mst explain kiya he(i mean mem).🔥🔥
One of the best explanation !
A much simpler approach
#include
using namespace std;
void swap(int& a, int& b){
int temp = a;
a=b;
b=temp;
}
int main() {
int a=2;
int b=4;
swap(a,b);
cout
❤❤❤❤ loved as always
Hitler reacting to IIT-JEE RESULTS -- ruclips.net/video/EioB3UK6IRM/видео.html
Love you, kaksha❤️
Hitler reacting to IIT-JEE RESULTS -- ruclips.net/video/EioB3UK6IRM/видео.html
Thanks for this wonderful video
Excellent explanation! 👍
Wow what a great explanation
Hats off Aman bhaiya
Hitler reacting to IIT-JEE RESULTS -- ruclips.net/video/EioB3UK6IRM/видео.html
Thank you didi you explained it very beautifully.
This is the amazing bole to next level🤘
Printers are the variables that stores the value of other variables
i used to always get confused with pointers. not anymore. good video
How to understand the content in English? Subtitles aren't available!
Bhaiya your videos are awesome , always motivate me ❤😇
starting me hi mistake kiya hai aapne
int a=10;
int *aptr;
aptr=&a;
cout
in notes, you have provided additional notes.... how to see those questions?
Ya i also wana know that. The same happens in last links.
Please make a tutorial on volatile keyword. It is bit confusing topic
links given in the pdf notes of this lecture are not working
pls give the link
Mam jab aap pointer pass kar rahe as an argument then receive karne wala phir double pointer hoga **p so aapne example ke time q nahi liya and output sahi kaise aaya phirbhi?👍
kya mast padhaya hai didi......
Pointer Concept: 0:10
Shukriya bhaii hum tau dhund hi nahi paa rahe tha XD
😂@@arafatkhan5489
lecture is very nice can you please tell the short cuts too...
Thank you so much ma'am. 🙏🙏
It will be great if you will share which stylus you are using with your macbook-Air while recording videos
As I can see Its URVI's Macbook-Air
Thank you Aman sir ☺
The code for pointers with explanation is here:
#include
using namespace std;
int main(){
int a = 10;
cout
void keyword is used when the function has no return value
#include
using namespace std;
void increment(int *a)
{
++*a;
}
int main()
{
int a=2;
int *ptr=&a;
increment(ptr);
cout
but still answer is same ?? ya change??
Web development kb aa raha h
12 dec
Bhaiya web Development Kabh Start Hoga ?
Hitler reacting to IIT-JEE RESULTS -- ruclips.net/video/EioB3UK6IRM/видео.html
correction at 16:51. You are passing addresses of pointers, not the pointers themselves
Hitler reacting to IIT-JEE RESULTS -- ruclips.net/video/EioB3UK6IRM/видео.html
Yep 👍 Functions only accept values. Here it’s value of pointer which is address of variable.
Those pointers are containing the addresses of variables, so whether you pass addresses or pass pointers itself since an indirection operator is used so there is no problem.
Give credits to the person teaching in the description as well. Great Video!
10:23 watched many times but still not able to understand the logic of why not adding +4i, and what does she mean by indexing pointer.
may be aage ke video me clear ho jaye
@@DheerajYadav-sf6tu tumhe kya ye cheez clear
@@harshhwardhanrai3716 na bhai abhi to hum isi lecture pr hai ho skta hai aage clear ho jaye kyunki aisa boht bar hua hai😊
ruclips.net/video/5FsIa4Mp3ho/видео.html🙏🏻
@@rameshmalhotra9525 bro 11 months have passed for that comment, I have already passed that phase of learning. Their is no need to suggest me any video. Also she did not teach well for new learners
The link in the pdf isn't working !