Array & Pointers in C Programming with examples
Вставка
- Опубліковано 10 січ 2022
- 👉Subscribe to our new channel: / @varunainashots
In this video we have discussed Array & Pointers in C Programming with examples.
►Programming in C (Complete Playlist):
• C Programming
Other subject-wise playlist Links:
--------------------------------------------------------------------------------------------------------------------------------------
►Design and Analysis of algorithms (DAA):
• Design and Analysis of...
►Database Management System:
• DBMS (Database Managem...
► Theory of Computation
• TOC(Theory of Computat...
►Artificial Intelligence:
• Artificial Intelligenc...
►Computer Networks (Complete Playlist):
• Computer Networks (Com...
►Operating System:
• Operating System (Comp...
►Structured Query Language (SQL):
• Structured Query Langu...
►Discrete Mathematics:
• Discrete Mathematics
►Compiler Design:
• Compiler Design (Compl...
►Number System:
• Number system
►Cloud Computing & BIG Data:
• Cloud Computing & BIG ...
►Software Engineering:
• Software Engineering
►Data Structure:
• Data Structure
►Computer Architecture :
• Computer Organization ...
►Graph Theory (Complete Playlist):
• Graph Theory
►Digital Logic:
• Digital Logic (Complet...
---------------------------------------------------------------------------------------------------------------------------------------
Our social media Links:
► Subscribe to us on UA-cam: / gatesmashers
►Subscribe to our new channel: / @varunainashots
► Like our page on Facebook: / gatesmashers
► Follow us on Instagram: / gate.smashers
► Follow us on Instagram: / varunainashots
► Follow us on Telegram: t.me/gatesmashersofficial
► Follow us on Threads: www.threads.net/@gate.smashers
--------------------------------------------------------------------------------------------------------------------------------------
►For Any Query, Suggestion or notes contribution:
Email us at: gatesmashers2018@gmail.com
Thank you so much, it's very helpful for interview preparation.
You are such a great teacher 👍👍
Sir your work is great. Keep it up. Thank you so much
Sir your teaching style is very very very best. Thank you for helping us 🙏🙂
Thank you sir
Very awesome style to teaching
Thank you so much sir you have given a very detailed explanation it was very helpful
Sir C programming and Data structure basic se Advance tak ( whole syllabus ) par videos banaiye.
S sir
ua-cam.com/video/KCoCasaWVAs/v-deo.html
Check out this channel, here they are creating whole data structure playlist using C/C++
Apko Mila notes
Yes sir
Plz sir
Waoo Sir meme to pahle baar apki video Dekhi hai or usne hi ek dam jkash Smj me aaya hai gjeb sir Ji gjeb
awesome video. thank you so much.
You did great help of mine in understanding of pointers.
According to output this program is auto type storage...if it is static then o/p will be
1 ,1,1,3,5,3
Amazing method.
Typo in first program:
p = x
(as opposed to p = &x, since we are equating the two pointers p and x, which is a pointer pointing to the first element of the array)
Outstanding method Sir..✨
As always enjoyed your vedios..
Sir ajjj first time mujhe arrays and pointers clear hue
Sir ! *P++ mein 1 answer aya but after answer, us ko 2 nhe ho jana cahiay. Next operation mein ++*p mein phr 2 use nhe ho ga??
God bless you and your family
Thank you sir , bahut knowledgeable video thi and easy to understand
Sir you are great thank you so much sir it is very very helpful for me thankyou sir
Thank you So much Sir🤩
CORRECTION:
p=1000
7:06
after *p++ the p pointer is pointing to the second element, that is it will hold the address 1004, in the next line ++*p , address 1004 is dereferenced and the value at this address is incremented, i.e the 2nd element of the array changes to 3. *++p if we do then first p is incremented to 1008 and p now points to third element of the array and now dereferencing 1008 will give the third element 3
Yess...
I was about to write this .
Are you sure about it?
But output of *p++ will be 1 right?
@@OvishaSanyal ++ just move to next index like if we have *arr={5,8} so when we use *arr++ than move to 8 because by default arr will be arr[0] which is 5 and add to it we get arr[1] which is 8
wow, and thank you it is really helpful
great video sir.....
Thank you sir...🙏🙏
In ex 2 in the time of disp fun call that will be disp(a);
Not disp(&a);
I'm so much impressed by ur teaching style sir ❤️.
yes correct
In array if you created,
int a[] = {11, 22, 33, 44, 55};
a == &a == &a[0]
because a is a pointer in on itself.
disp(&a) is also correct, it will give same result for all operations.
@@ashishkumaryadav5252 disp (&a) did not work. display (a) works.
Fantastic 😊😊
When we r done with printf("%d", *p++ ) output=1 then X[0] will become 2 na???
you are great man
Awesome sir ji
Sir best work
Thankyouuu sir😌
Nice explanation
Sir kindly start a course for ugc net
Sir p++ post increment kyou use kre ge jb kuch hi nahi change hoga toh
P++ means p=p+1;
You are not using this increment for next lines of statements.
Yes
Yes u r right
Yes.. Pointer should point to next element
8.50 output will be 0 because, P++ and ++p ne index change kar diya. Sir
sir *(p+4) is out of bound of array bcz p is pointing to X[1] at this point.
Dear sir, kindly make a video on uppcl AE for cse
Bahut shi padaya
Tq sir
Thanks sir very easy method 🤍🤍🤍🤍🙏🙏🙏
Sir ap data structure k all topics pr complete playlist bnaay plz
p++ should also increasing the address too..
Subscriber bohut jaruri hei 🎉
Suggestion : use a monospace code font like jetbrains mono instead of times new Roman for code blocks.
Jai Shree Ram
Sir agar ham ne programming kar lene ke bad white printout kaise nikalwaye
Sir printf("%d", *p++)
1kase aayega ye to 2 nahi aana chahiye tha
actually the pointer must point to x[0]. Else it would give an error
Sir your output and actual system output not matching.. bit confusing who is right you or software ...++*p changeing actual data of array .. please do practical of this and clear the doubt..
P=X we can no
P=ampersand x not needed??
Sir you made a mistake at 6:30
printf("%d",*p++); will give the answer 1 but will increment pointer p to its next location so pointer p will contain the address 1004 not 1000.
@Atul Shende You should try running the code.
Yes, i have the same logic
yeah you are right abut that
Yes..i agree
Sir pointer arithmetic in c concept
1 video please
Sir int mai to 2 bytes hoti hai aapne 4bytes li hai
And p-1 me kaise change hoga kaise address change hoga
Sir 2D array ka ek video post karona please
Nice ❤️🤗👍
ua-cam.com/video/KCoCasaWVAs/v-deo.html
Check out this channel, here they are creating whole data structure playlist using C/C++
Aaj puri bca mca complete karne k baad muze ye samaj aaya
Sir sb smjh aa rha tha last wala program dikha Diya aapne.😂
x == &x, when x is an array. Type of both though are different.
ua-cam.com/video/KCoCasaWVAs/v-deo.html
Check out this channel, here they are creating whole data structure playlist using C/C++
Hello Sir
there is a mistake in your last example. The correct code is:
#include
void disp(int *x);
int main()
{
int a[5]={1,2,3,4,5};
disp(a);
return 0;
}
void disp(int *x)
{
printf("%d
",*x);
printf("%d",*(x+3));
}
// It disp(a) not disp(&a)
Add subtitles for every video
" *ptr++ " will print 1 but ptr will point to location 1004 as Postfix..
Any reply is appreciated...
Only legend know about that😉
yeah you right about that
@@shahrukhrehman5157 pls tell then
ua-cam.com/video/KCoCasaWVAs/v-deo.html
Check out this channel, here they are creating whole data structure playlist using C/C++
@@sp8602 watch arithmetic videos for this
Why nothing changed in *p++??
4th Printf me 3 print hoga sir aapne galt bataya yaha
Sir complete c kara dijiye request by heart
ua-cam.com/video/KCoCasaWVAs/v-deo.html
Check out this channel, here they are creating whole data structure playlist using C/C++
Padhate nhi ho aap but aaj glat pda diya sir ji
Brother let me correct you please.. disp () is called function whereas main is calling function.. u are using the words interchangeably...
Hii sir
Kuch samajh nahi aa Raha hai 😔😔
background white screen is too bright pls alter
1 ,1 ,1 , 3 , 5 , 3
ua-cam.com/video/KCoCasaWVAs/v-deo.html
Check out this channel, here they are creating whole data structure playlist using C/C++
sir mujhe bilkul bhi bura nahi lag raha ye bolte hua ki aap sourav sir se accha explain kerte ho 🙂
First comment
ua-cam.com/video/KCoCasaWVAs/v-deo.html
Check out this channel, here they are creating whole data structure playlist using C/C++
Computer teacher le sir btye ga
😶
Your Concept is not clear sir. Read Balaguruswami
😂
Sir plz spk in english or else please add english subtitles. We are not able to catch hindi with this much speed of talking.
ua-cam.com/video/KCoCasaWVAs/v-deo.html
Check out this channel, here they are creating whole data structure playlist using C/C++
Explain in English not in Hindi language ...
Sir may be o/p is wrong o/p is
1
1
1
3
6422284 garbage value
3
o/p=1 according to post increment the value will be use first p++ is 0 after this 0 will be increment to 1 p=&a[1]
then next ++*p , p=1 and it is o/p is *p=2 ++2=3;
next *(p+4) here p=&x[2] 1008+4*4 = 1032 its gives garbage value
next p=&x[2]; *p=3
next op p=&x[2]; printf("%d",*(p-1)); its giving 3 but i can't understand this
Cry n8ce
Ap kal student comments bhi unhi ladkiyo ka hi like karte hai bas😅😢
Mera bhi comment ak din viral hoga😢😢
void input_employeeDetail(struct employee *ptr1, int size)
{
int i;
for (i = 0; i< size; i++)
{
printf("Enter details of(Id ,Name , Salary) %d employee : ", i + 1);
scanf("%d", &(ptr1+i)->employee_id); // why use &(ptr1+1)->employee_id.
fflush(stdin);
gets((ptr1+i)->name); // but here is not use & symbol
scanf("%f", &(ptr1+i)->salary);
}
}
please replay
i'm 😕 😕
ua-cam.com/video/KCoCasaWVAs/v-deo.html
Check out this channel, here they are creating whole data structure playlist using C/C++
Re code hi apne sarir se chhupa leta hai, aur bad bad start