C_75 Pointers in C-part 5 | Pointer Arithmetic (Addition) with program

  Рет қаралды 219,289

Jenny's Lectures CS IT

Jenny's Lectures CS IT

Күн бұрын

In this lecture we will discuss Pointer Arithmetic. How to perform addition with pointers.
Best C Programming Tutorials: • Programming in C
*********************************************
Connect & Contact Me:
Jenny's Lecture Hindi: / @jennyslectureshindi
Facebook: / jennys-lectures-csit-n...
Quora: www.quora.com/...
Instagram: / jayantikhatrilamba
Twitter: / khatrijenny
Telegram Group Link: Jenny's Lectures
telegram.me/je...
*******************************************
More Playlists:
Programming in C Tutorials: • Programming in C
C++ Tutorials for beginners: • Lec 1: How to Install ...
Printing Pattern in C: • Printing Pattern Progr...
Best Python Tutorials for Beginners: • Python - Basic to Advance
Placement Series: • Placements Series
Data Structures and Algorithms: https: • Data Structures and Al...
Design and Analysis of Algorithms(DAA): • Design and Analysis of...
Dynamic Programming: • Dynamic Programming
Operating Systems tutorials: // • Operating Systems
DBMS Tutorials: • DBMS (Database Managem...
Tags:
pointers in c, what is pointer, introduction to pointers in c
#coding #strings #jennyslectures #cprogramming #clanguage

Пікірлер: 182
@ashishphaltankar
@ashishphaltankar 3 жыл бұрын
Now I'm not attending my college lectures of Programming in C. I'm Attending the lectures of this channel. Mam you teach far far better than My college professors. Indeed I wasted my money in my college to learn Programming but fact is I'm learning Programming from you mam that also toataly free.
@harshvb2676
@harshvb2676 Жыл бұрын
Us moment bro
@codeishard3182
@codeishard3182 2 жыл бұрын
Now, p = 1012( or it points a[3] ) *p = 2; means value at p or at address 1012 is 2; so, now a[3] = 2; *p will print 2.
@omnamahshivaya7081
@omnamahshivaya7081 2 жыл бұрын
It will point for a[1] as mam has given p=p+1
@madhavan.1209
@madhavan.1209 2 жыл бұрын
@@omnamahshivaya7081 she already changed the value in *p =1008 (p=p+2) now p+1 =1012 the *p is pointing & of 1012 the & has value a[3]=10 then changed to 2
@ananyaghosh6402
@ananyaghosh6402 Жыл бұрын
what was internal pointer Again?
@NTuRN11
@NTuRN11 Жыл бұрын
@@ananyaghosh6402 i think it points to the base address of the variable,,,,like in this code a is the internal pointer who is pointing to 1000(base address of the variable)...........nah bro im so confused...😭
@mhsujal417
@mhsujal417 Жыл бұрын
2 print ❤
@bawaabdulsilas3681
@bawaabdulsilas3681 Жыл бұрын
Before the line p = p + 1; Pointer p was pointing to this address [1008]; So when the line p = p + 1 is executed, then p will be pointing to the next address which is [1012]; On the next line *p = 2, reassigned the value at address [1012] which is 10 to 2; Finally, address [1012] now stores 2, and the statement printf("%d ", *p) will print 2 on the screen.
@hyperspacecode
@hyperspacecode Жыл бұрын
Correct for 3 points.
@yashhokte1020
@yashhokte1020 2 жыл бұрын
17:56 may be a[3] stored the value 2 and *p will print 2 value
@navneetrampal3977
@navneetrampal3977 2 жыл бұрын
Actually ma'am you don't believe I took online subscription to learn coding but still I am here and watching lectures of pointer there are the n numbers of videos on you tube but the concepts that you clear that's really amazing thank you by heart tomorrow is my exam
@GursandeepSingh-bl4qq
@GursandeepSingh-bl4qq Жыл бұрын
Paper kisa gya apka 😊
@JaydeepTrivedii
@JaydeepTrivedii Жыл бұрын
​@@GursandeepSingh-bl4qqbahut jaldi puch liya 😊
@anandsinha2289
@anandsinha2289 Жыл бұрын
After p=p+1; As we see it is giving the address of 1012 and it is storing 3 so as *p=2; Now at address of 1012 value 3 will be assigned
@satyavansharma4213
@satyavansharma4213 3 жыл бұрын
Nice mam thanks for this type videos i pray to God your chennel get the 5 million subscribes
@faithfullyfactual
@faithfullyfactual Жыл бұрын
current value of *p is now 2. hence printf("%d", *p); would print 2. That also means that a[3] has also been modified to be 2.
@khushichoudhary5996
@khushichoudhary5996 Жыл бұрын
p is a pointer and if *p=2 then in pointer p, 2 is not going to store because p is a pointer and pointer can only store address not any integer value.
@tirthtanna7771
@tirthtanna7771 3 жыл бұрын
the value of *p will be 2
@vickyvignesh3844
@vickyvignesh3844 3 жыл бұрын
mam waited for pointers for a long time thanks for start uploading mam!!.please post all videos as soon as possible mam.please try to upload 2 videos per day mam.Thank you mam!!
@Riyaaa677
@Riyaaa677 2 жыл бұрын
I guess value of a[3] will b modified to 2
@ginilance7427
@ginilance7427 10 ай бұрын
It will be modified to -8. 1 is at index 0. 4 is at index 1 2 is at index 2 -8 is at index 3 0 is at index 4
@chiragmaloo7504
@chiragmaloo7504 9 ай бұрын
@@ginilance7427 wrong hai
@MitikuMitihans
@MitikuMitihans 5 ай бұрын
Hey how are you where are you from
@Jardaani_Jovonovich
@Jardaani_Jovonovich 4 ай бұрын
@@MitikuMitihans chaduvukora gaadidha...
@O_bi_to7
@O_bi_to7 3 ай бұрын
Probably
@tirthtanna7771
@tirthtanna7771 3 жыл бұрын
Mam you are the lifeline for many students
@etceterafans2345
@etceterafans2345 2 жыл бұрын
*p=2; printf("%d", *p); it will give the output of 2
@SumangalaSipoy-tj3ey
@SumangalaSipoy-tj3ey 5 ай бұрын
p+1; value is -1 itself mam
@Busy_girl-mq2cf
@Busy_girl-mq2cf 7 ай бұрын
p=address of 3 and *p means that the value in which the pointer is pointing will change to 2 . So the out put will be 2
@vimala7830
@vimala7830 3 жыл бұрын
Thanks a lot mam for your very clear explanation ☺️
@imadbenmadi
@imadbenmadi Жыл бұрын
thank u very mush , i was having a big problem in understanding pointers and work with theme . its a really simplify explication thanks for all your hard work
@brundar860
@brundar860 2 жыл бұрын
Hlo mam I think if you take only the theory party , that would be enough no need of practical
@vinitkumar.3588
@vinitkumar.3588 3 жыл бұрын
You are the best teacher ma'am
@priyeshmalviya1886
@priyeshmalviya1886 2 жыл бұрын
Mam if pointer has no data type then why its a need to use format specifier of related data type while using printf.
@vanshikagarg7586
@vanshikagarg7586 Жыл бұрын
output will be : 0 -1 2
@yannamsettiaishwarya7448
@yannamsettiaishwarya7448 2 жыл бұрын
int *p=&a[1] is it possible mam..or we should give only for base address..?
@arshuarshad1551
@arshuarshad1551 8 ай бұрын
16:46 if we write p+1 than it will not give error it will give base value of array element which define before this statement like this *p=&a[0];
@abdulrahimjalloh363
@abdulrahimjalloh363 Жыл бұрын
p=p+1; *p=2; printf("%d",*p); .............Since P has already pointed to 1012, it means the value at 1012 will be changes to 2.
@dineshkantineni6232
@dineshkantineni6232 2 жыл бұрын
mam please discuss about storage classes your videos is very helpful to me
@maryannemuthoni5388
@maryannemuthoni5388 7 ай бұрын
p + 1; printf("%d", *p); *p will still be value of the first element 0, if one wanted it to point to the second element it should be p = p + 1; The second question: (This is if we are assuming p points to the first element p[0]:) p = p + 1; p will not point to the second element *p will be equals to one then when you do *p = 2 the value for the second element p[1] becomes 2
@tmr1947
@tmr1947 3 жыл бұрын
mam how to start gate preparation in my 1st year. will you plz tell me tips and best online resources🙏🙏🙏
@anujeetkunturkar780
@anujeetkunturkar780 3 жыл бұрын
It will print 2.
@engineernijo95
@engineernijo95 2 жыл бұрын
maam which application do you use to compile programs if you don't mind send me the link to download
@python-2023
@python-2023 2 жыл бұрын
Mom some of your videos don't have subtitles please add subtitles in all of your videos Thank you
@devayanirajendran4005
@devayanirajendran4005 2 жыл бұрын
Pls anybody explain if I get input from user by using for loop thn I store address of a as *p=a[i ]
@subassnirmal1010
@subassnirmal1010 2 жыл бұрын
Me too did you get the answer
@chetansingh55
@chetansingh55 3 жыл бұрын
Thanks mam. These videos are too helpful to me. Thanks for frequent uploading of videos❤
@SravanKumar-uc6qt
@SravanKumar-uc6qt 3 жыл бұрын
Respected madam zi, Pointer is different statement function Arthemetic is different statement function How can you write this programm May it not possible, May be it will possible is coding, development data, algorithm
@freefiregamer076
@freefiregamer076 10 ай бұрын
The way of explaining it's easy for me
@tanmay5070
@tanmay5070 Ай бұрын
ma'am, int takes 4 bytes in a 64 bit machine and 2 bytes in a 32 bit machine
@yannamsettiaishwarya7448
@yannamsettiaishwarya7448 2 жыл бұрын
i have a doubt that..for integer 2 bytes.. but mam is telling that 4 bytes.. i think its iong int.. why we took that..?
@vishalG777
@vishalG777 Жыл бұрын
Why are performing arithmetic operations on pointer just to access the different values of arrays, we can simply access different elements using the index of that element!
@meme_engineering4521
@meme_engineering4521 3 жыл бұрын
Kaash mere school time pe aapka channel hota 😭
@mdmonisali9177
@mdmonisali9177 3 жыл бұрын
Mam please explain about enumerated data type
@atomsherlock6647
@atomsherlock6647 3 жыл бұрын
Hi, Mam, may games as exercises would complete perfectly your lessons ? Thanks anyway.
@codingworlds724
@codingworlds724 3 жыл бұрын
last question answer is *p = 2 then it will show 2 answer it will change the value
@williemungai1954
@williemungai1954 2 жыл бұрын
*p will print out 2...the value of a[0] will be changed to 2
@megh5013
@megh5013 2 жыл бұрын
Thanks a lot Mam for this lecture!!!
@meghasinha1706
@meghasinha1706 3 жыл бұрын
Thanks for your efforts mam
@akhilmittal3283
@akhilmittal3283 2 жыл бұрын
padhke like bhi kr diya kro yrr itti acchi mam hai
@l.lawliet4636
@l.lawliet4636 2 жыл бұрын
Value of *p will finally be 2 Value stored at 1012 will be replaced by 2....
@Mr_Kumar_Sai
@Mr_Kumar_Sai Жыл бұрын
2 will print in the address location 1012.
@devSackey
@devSackey Жыл бұрын
it will print 2; Thanks for the free explanation
@AvinashKashyap-ux9ch
@AvinashKashyap-ux9ch 10 ай бұрын
0:53--2:33 promotion. Skip this part.
@okunoyesouleiman9117
@okunoyesouleiman9117 Жыл бұрын
can I download the play list in one video ?
@SumangalaSipoy-tj3ey
@SumangalaSipoy-tj3ey 5 ай бұрын
p=p+2; value of *p=-1 p=p+1; value of *p=10 *p=2; value of *p=2
@kwameanati
@kwameanati Жыл бұрын
The value of *p is 2.
@layson8072
@layson8072 9 ай бұрын
It will print => 2
@prashantpatel4636
@prashantpatel4636 3 жыл бұрын
Mam abhi kitne video aur aayenge c language ke??... Means kitne topics remaining hai?
@bainaboyinakarthik9945
@bainaboyinakarthik9945 6 ай бұрын
Mam pointers topic ,I feel some difficult
@Vemon564
@Vemon564 4 ай бұрын
I fell array string is hard to understand😉
@lifemalayalamyoutube7192
@lifemalayalamyoutube7192 2 ай бұрын
Think simply, pointer is just a variable(means, a location in memory).Unlike usual variables which store a value, this pointer stores the address of other variables. Think about the example, to know your address, one can ask your relative. Your relative is like a pointer variable😊
@phanimanojoleti6606
@phanimanojoleti6606 2 жыл бұрын
Class is nice mam.but on pc we are not able to see the letters .please try to zoom it mam
@ChillOutinLove
@ChillOutinLove 3 жыл бұрын
Ma'am p is pointer and size of pointer is 8 , then how we can't do p = p + 2 , p = 1000 + 2*8 p = 1016 Ma'am pls clear my doubt
@guddititejesh5426
@guddititejesh5426 2 жыл бұрын
You can't write 2*8 instead of this you write 2*4 because it is a integer type it contains 4 bytes..
@SwetaKumari-ps2rf
@SwetaKumari-ps2rf 2 жыл бұрын
Pointer is not a data type ...so u cannot multiple with 2..here data type is integer .so we can use 4 intead of 8
@Cm-zc2zx
@Cm-zc2zx 8 ай бұрын
Thank you so much mam ... Yhi to sikhna tha muze 😊😊
@satyajitmanna8501
@satyajitmanna8501 2 жыл бұрын
*p=2; korla a[3] ta 2 store hoba .
@itzharivlog273
@itzharivlog273 3 жыл бұрын
Make a python tutorial
@ManjuSingh-hz8tr
@ManjuSingh-hz8tr 3 жыл бұрын
Mam. I want to join your Ur class ...but mujhe samaj nii aara kese join hoga to plz help kr do
@intellectualclasses1857
@intellectualclasses1857 3 жыл бұрын
Ma'am do you take live classes? Please reply me Ma'am!
@smrfan2334
@smrfan2334 2 жыл бұрын
No
@kamalraj7526
@kamalraj7526 Жыл бұрын
start 2:32
@Sunrise-Cricket-2358
@Sunrise-Cricket-2358 Жыл бұрын
It will give 2, because we have assigned it.
@Shylakarigowda-zq5ho
@Shylakarigowda-zq5ho Жыл бұрын
Ans=2
@sourabhpandey2706
@sourabhpandey2706 2 жыл бұрын
Error hai *p=2 but pointer ka datatype define hi nahi hai *p means pointer variable .....
@softdevrajanikant3750
@softdevrajanikant3750 2 жыл бұрын
Integer are stored 2 byte not 4 byte
@venkatesh3833
@venkatesh3833 Жыл бұрын
Thanks a lot mam for your clear explanation
@barathkumarg3461
@barathkumarg3461 3 жыл бұрын
Very useful for gate mam
@dominicamaria2897
@dominicamaria2897 3 жыл бұрын
18:53 error: assignment to expression with array type p=p+2, a=a+2; ^ It is showing error madam.👆
@venkatarohitpotnuru38
@venkatarohitpotnuru38 2 жыл бұрын
yes you cant operate on constant pointer a
@motemontero5592
@motemontero5592 3 жыл бұрын
Please madam after completing this c programming we need GTK+ FOR C PROGRAMMING
@ashutoshpatidar4903
@ashutoshpatidar4903 Жыл бұрын
Value at 1000 will be change to 2
@yashahuja1550
@yashahuja1550 Жыл бұрын
no bro, value at 1012 will be changed to 2
@GalaxyCookies76
@GalaxyCookies76 Жыл бұрын
Hatts off Big fan from Pakistan
@lyricals816
@lyricals816 Жыл бұрын
You are amazing mam
@DailySongs12
@DailySongs12 2 жыл бұрын
in array a[2] is update as 2
@arundharekar4984
@arundharekar4984 Жыл бұрын
i guess the 3rd element of array is replaced by 2.... then it will print 2.
@7VNMusic.
@7VNMusic. Жыл бұрын
suddenly, mujhe c language mai interest aane laga
@sharathshar
@sharathshar 2 жыл бұрын
Beauty with brain
@themonstersgaming9711
@themonstersgaming9711 3 жыл бұрын
So beautiful
@learningwithankit8701
@learningwithankit8701 3 жыл бұрын
First one for first time ❤️❤️❤️
@ashishphaltankar
@ashishphaltankar 3 жыл бұрын
Learning with Ankit what is your channel about
@learningwithankit8701
@learningwithankit8701 3 жыл бұрын
@@ashishphaltankar it covers all latest coding questions asked in different companies
@ashishphaltankar
@ashishphaltankar 3 жыл бұрын
@@learningwithankit8701 You too teach coding?
@learningwithankit8701
@learningwithankit8701 3 жыл бұрын
@@ashishphaltankar yes
@DilkhushKumar-dc8ed
@DilkhushKumar-dc8ed 10 ай бұрын
Is it write :- int a=3; int *p=&a; p=p+a;
@nehamaheshwari1502
@nehamaheshwari1502 3 жыл бұрын
After competing c lang...mam plz upload the video on java...
@BTCIV_AyushMalviya
@BTCIV_AyushMalviya 2 жыл бұрын
Thankyou Mam
@k.nirmalnethra6194
@k.nirmalnethra6194 Ай бұрын
Answer would be 2
@peymanschule9902
@peymanschule9902 8 ай бұрын
thanks 🥲
@yuvrajgupta3763
@yuvrajgupta3763 2 жыл бұрын
Answer will be 2
@amanbhatt8506
@amanbhatt8506 Жыл бұрын
Thanks mam ❤
@SravanKumar-uc6qt
@SravanKumar-uc6qt 3 жыл бұрын
Respected madam zi,
@chaukseyneeti9761
@chaukseyneeti9761 3 жыл бұрын
mam please speak little louder so it can be audible
@shashank57
@shashank57 3 жыл бұрын
*p will be 2
@user-ku3oh6mi9y
@user-ku3oh6mi9y 3 ай бұрын
You are soo cute yaaar😊🎉
@lucy2003-d8p
@lucy2003-d8p 2 жыл бұрын
🙏🏼🙏🏼🙏🏼
@KrishnaGupta-he1sz
@KrishnaGupta-he1sz 2 жыл бұрын
2x par dekhne wale log like kare...😁
@chessforlearners5873
@chessforlearners5873 3 жыл бұрын
if p=a+2 ...then what
@kushimthakona9288
@kushimthakona9288 3 жыл бұрын
start functions concept also in c mam
@shanayasingh7949
@shanayasingh7949 2 жыл бұрын
Mehnet 💥
@tejaskharde9122
@tejaskharde9122 2 жыл бұрын
24:41 after changing *p value what happened if we print whole array did i lt print like this {1,4,34,-8,0} or it print original array
@TheGoldFarhad
@TheGoldFarhad 2 жыл бұрын
No, only the array we are on will change its value. So in this case we are on a[4]. So a[4] = 2 now. when printing all arrays we will get " 0,1, -1, 2, 11 "
@sourabhpandey2706
@sourabhpandey2706 2 жыл бұрын
*p=2 does not make any sense
@aniketkumar3126
@aniketkumar3126 3 жыл бұрын
Love you mam ❤
C_76 Pointers in C- part 6 | Pointer Arithmetic (Subtraction) with program
17:48
Jenny's Lectures CS IT
Рет қаралды 156 М.
C_74 Pointers in C- part 4 | Pointer to Pointer (Double Pointer)
25:06
Jenny's Lectures CS IT
Рет қаралды 247 М.
Пришёл к другу на ночёвку 😂
01:00
Cadrol&Fatich
Рет қаралды 6 МЛН
The FASTEST way to PASS SNACKS! #shorts #mingweirocks
00:36
mingweirocks
Рет қаралды 15 МЛН
Aim Boost Crosshairs (with code)
4:00
Jerry FPS
Рет қаралды 10 М.
🔴 Python Pulse - Securing Python Applications
Visual Studio Code
Рет қаралды 24
C_71 Pointers in C - part 1| Introduction to pointers in C | C Programming Tutorials
17:02
C_77 Pointers in C- part 7 | Pointer Arithmetic (Increment/Decrement) program
21:03
C_78 Problems on Pointers | Important question with answer
12:11
Jenny's Lectures CS IT
Рет қаралды 162 М.
C_84 Introduction to Functions - part 1 | C Language Tutorials
25:27
Jenny's Lectures CS IT
Рет қаралды 972 М.
C_80 Void Pointer in C | Detailed explanation with program
18:05
Jenny's Lectures CS IT
Рет қаралды 138 М.