there should be a scanf after first for loop, to take the user input of "position" value which the user want to delete. scanf("%d", &position); thanks ✌
hello sir you had done great job sir .for uploading all program languages in youtube. past one month i was watching your c program videos .In every c program videos your explanation is so good. your videos are sharing with my friends. thank you.
This video was very clear and understandable .This topic was confusing me very much but after watching this video I found this topic very easy and interesting.Thank you very much
Sir how.. if we want to delete the last element ( a[4] ), should we write another set of for loops for this or we can solve in any other alternative way
hi soumya thanks for your interest towards our channel and share my sessions with your friends and subscribe to our channel.Keep following our channel.
hi krupalatha thanks for your interest towards our channel and share my sessions with your friends and subscribe to our channel.Keep following our channel.
hi here we are not deleting the element but just replacing all the elements from the position where we have deleted. hope you understood. thanks for your interest towards our channel and share my sessions with your friends and subscribe to our channel.Keep following our channel.
my teacher gave me an assignment that is saying : how to delete first , middle and last element from an array by index and by value. In addtion that deleting an element not mean delete it completly from memory , so he needs to delete the element completely from RAM. I searched in internet, but I didnt find a method or specific way to follow. Note : the lesson is list in c++ data structure , not linked list ... please can I contact you to solve my problem ?.
In my head is make some pointer,whichis the pointer point to element position,after that delete it,and than do your code,I don't know if I correct or not:)) I'll see you guys answer,btw I fall in love with coding:)) Great video
excuse me sry for this but where are u taking the value of position for deleting the element.And 2nd most important thing is that u are not displaying any msg for the user to understand the better way to program flow.
that is the trick of his teaching, cause of that u asking doubt about program, if he give everything perfectly, u will never see the comment section and u never get any doubt
Sir Position value we must be declared According to our problem we want to deleat 30 element which have index value 2 So we must put int position=2 Thank you sir ❤
Sir actually after the 3rd for loop fails it goes to 2nd for loop and when 2nd one fails it goes to first for loop and only then we can do increment or decrement operation
so after deleting a[2], would there still be a a[4] with a value 50 AND a a[3] with a value of 50 as well, since the a[4]th position never actually gets modified?
hi Aleem nice question here the deletion means just replacing the elements with next elements. so 50 will be stored in both the positions a[3] and a[4]. but if we delete the element, the size of array will be reduced to size-1. so while displaying the array we need to print the values till size-1. hope your doubt has been clarified.
Brother for insertion and deletion i can't be initiated with 0. We always use the above said FOR loop by initialising from position element and elements beyond it. And we dont touch the elements in left of position.
hi Akshit i am sure and i will not mug up the program so i may be wrong some times so i analyse it there and explained further. thanks for your interest towards our channel and share my sessions with your friends and subscribe to our channel.Keep following our channel.
there should be a scanf after first for loop, to take the user input of "position" value which the user want to delete.
scanf("%d", &position);
thanks ✌
❤️
correct code is
int i,a[100],pos,n;
printf("enter number:
");
scanf("%d",&n);
for(i=0; i
hello sir
you had done great job sir .for uploading all program languages in youtube.
past one month i was watching your c program videos .In every c program videos your explanation is so good.
your videos are sharing with my friends.
thank you.
Sir suppose I want to delete the last element of an array then how will i do it...
Since there is no next element to override the last element
Sir u haven't accepted the position from the user
1 line missing that's- scanf("%d",&position);
😂
You can declare at beginning int position= 2
😝😝🙏🏻🙏🏻
Great teacher ❤. You've fans/followers in Pakistan too
Got a bit confused 😬, but you're sincere . Great explanation and I subbed :-) love from France
"Merci beaucoup" ;-)
can i belive u r from france
S
I didn't see this kind of wonderful teaching and explanation ❤️❤️❤️❤️. But so sad that subscribers are very less. All the best sir❤️❤️❤️❤️👍👍👍👍👍.
Great teacher that I have ever seen in my life . Best of wishes sir.
Nice video! Straight to the point and easy to follow. Thanks!
This video was very clear and understandable .This topic was confusing me very much but after watching this video I found this topic very easy and interesting.Thank you very much
hi
thanks for your interest and support towards our channel. keep on following my sessions.
Great teacher..Love and respect from Bangladesh
Sir shouldn't we write i
NICE SUPER EXCELLENT MOTIVATED
Sir this is user defined function nd also in this there is an error. You r not assigned any value of position
Thnq very much sir.... This topic I didn't understand in my cls..... After seeing this video I'm perfectly all right for this topic
Nice teaching sir✌️
Awesome. I'm learning from Bangladesh
How is it deleted? If we print i[5],itll also gv same value of i[4],as it was just equated.
Tq so much sir I can saw all the videos related ds really so good and clear understanding
sir u shifted the rightmoste element to left but the numbr not deleted from the position
please tell me if i am wrong
We haven't deleted a[5] completely can't we do that using this concept???
Sir u did not delete the element,snd didn't accept the position.
How would you know that position is itrator but not a nunber
Nice Course
sir pls let me know with a program how to remove duplicate charactors from string
Very Nice Sirji
Sir how.. if we want to delete the last element ( a[4] ), should we write another set of for loops for this or we can solve in any other alternative way
To delete last element ::--
In printing for loop we take n-1 i.e
for(i=0;i
Sir you explanation is great and easy to understandable, thankyou sir
Love from m.p.
Sir,value of position is not accepted from the user.
Great video to understand something
Hes so innocent 😭❤
Nice video sir... keep doing the same..
hi soumya
thanks for your interest towards our channel and share my sessions with your friends and subscribe to our channel.Keep following our channel.
Wah sir... Very nice
Good explanation! Thank you sir
Hello sir, you didn't mention input for position (scanf). For secound for loop initiation
Sir this program is not completed. the output is not coming
What about the index which l want to delete is the last element.. what can I do... isn't it regarded a bug ?
Why it is not executing correctly if we entered array elements directly
But if i use scan it is executing correctly
Thanks for this vedio sir very doubts are cleared
Would you please make a video on insertion and deletion of elements in a 2-D array..I am facing problem in doing so..
Nice teaching sir .... very understandable teaching
hi krupalatha
thanks for your interest towards our channel and share my sessions with your friends and subscribe to our channel.Keep following our channel.
sir i have executed your code but output is not showing anything it is showing a blank screen sir
Sir position kha print ho rhi h.. program m.. ya fix kr di
hi
here we are not deleting the element but just replacing all the elements from the position where we have deleted.
hope you understood.
thanks for your interest towards our channel and share my sessions with your friends and subscribe to our channel.Keep following our channel.
Just awesome 👌
Keep doing the same sir
👍
hi aman
thanks for your interest towards our channel and share my sessions with your friends and subscribe to our channel.Keep following our channel.
you missed to assign position value in the program sir.. nice lecture
hi balaji
thanks for your observation.
For the 2nd for loop, it should be i = position -1 and not i = position
Ya bro , sir ne index delete Kiya hai position delete karne ke liye i=p-1 karna padenga
for the end position how will it delete?
Can u even use decrement here . If we can use decrement.How?
Sir, Can you please share me the 1st video link, so that I can continue from basic C course.. please
ruclips.net/p/PLLOxZwkBK52AE9jFVOGZTJxaiAC_xB8Yy
sir i am getting wrong when i am writing A[i]=A[i++]; i dont know why it was happening sir;
i++=i+1, but iam not geeting the answer sir
Hi
If possible send me your program to My email
askme.selflearning@gmail.com
how can I remove the element completely from memory locations ?
hi
we have to use pointers and allocate the memory dynamically. then we can remove the memory locations after their use.
my teacher gave me an assignment that is saying : how to delete first , middle and last element from an array by index and by value. In addtion that deleting an element not mean delete it completly from memory , so he needs to delete the element completely from RAM. I searched in internet, but I didnt find a method or specific way to follow. Note : the lesson is list in c++ data structure , not linked list ... please can I contact you to solve my problem ?.
thank you so much for the video
Legend sir... Tommorow is my end semister examination it will really help me ...tysm 😊
Sir u r not assigned value of position!
Thanks man. You are a god
hi ben
thanks for your interest towards our channel.
great teacher
In my head is make some pointer,whichis the pointer point to element position,after that delete it,and than do your code,I don't know if I correct or not:)) I'll see you guys answer,btw I fall in love with coding:)) Great video
sir, it should be [i-1] instead of [i+] , because we are going to the back side na , 5 to 4 , 4 to 3
so it should be [i-1]
array[i]=array[i-1] i think it's right we are not adding any number here ,
we have done deletion so position should be decreased
Out put of this program???I want
excuse me sry for this but where are u taking the value of position for deleting the element.And 2nd most important thing is that u are not displaying any msg for the user to understand the better way to program flow.
your classes is very interesting
very nice sir
Thank you very much sir
sir, i is assigned to 2 in the second for loop?
Brillient sir
can please tell about insertion of array for tracing
Sir u didn't read the position
why did we assign i=postion in second for loop?
awesome explanation sir, keep it up, great 👍🙂👍👍👍🙂🙂🙂
thnx from morocco
sir..aapne program me position ki value declare krte tm bhi nhi diya....n run tm pe user se lene k liye bhi koi coding nhi h..
that is the trick of his teaching, cause of that u asking doubt about program, if he give everything perfectly, u will never see the comment section and u never get any doubt
Correct it guys
for(i=position-1;i
In that case the element before the position will also be deleted
output ?
Sir Position value we must be declared
According to our problem we want to deleat 30 element which have index value 2
So we must put int position=2
Thank you sir ❤
This was useful
hi
thanks for your support towards our channel.
Sir your program is pre defined.pls do user defined program on deletion
Sir actually after the 3rd for loop fails it goes to 2nd for loop and when 2nd one fails it goes to first for loop and only then we can do increment or decrement operation
Bro it's is not nested for loop
Sir again you forgeted some thing 😂🤣 that is to scanning the position in coding!
Its ok , everybody makes mistake .
And you forgot that it's forgot not forgeted 😄😄
Thank you sir ...☺
hi takla
thanks for watching and supporting our channel.
Maja agya bhai
Better to use a variable size after deletion of array you perform decrement operation than size is decreased
so after deleting a[2], would there still be a a[4] with a value 50 AND a a[3] with a value of 50 as well, since the a[4]th position never actually gets modified?
hi Aleem
nice question here the deletion means just replacing the elements with next elements. so 50 will be stored in both the positions a[3] and a[4]. but if we delete the element, the size of array will be reduced to size-1. so while displaying the array we need to print the values till size-1.
hope your doubt has been clarified.
here is the full code
#include
main()
{
int arr[50],i,n,loc;
printf("enter the size:");
scanf("%d",&n);
printf("enter %d elements:",n);
for(i=0;i
thanks sir😁
hi Vishal
thanks for watching my sessions and your interest and support towards our channel.
For(I=0;i
No it is not correct.
For ( i= 0;i>=position;i--) is correct
@@ShivamSharma-vv2jt i=3 rest is all correct
Brother for insertion and deletion i can't be initiated with 0. We always use the above said FOR loop by initialising from position element and elements beyond it. And we dont touch the elements in left of position.
Nycc sir
I think array[i]=[i+1]is wrong we have to right [i-1]at the place of [i+1]?because values are decreasing...
hi Mask
once compile the program and i have done it and it works correct.
if you still find difficulty let me know.
Sir if i write the logic as
for(i=n; i>position;i--)
a[i]=a[i-1] will it be wrong??
Thank you sir
If u don't mine plz show the working process and out put in IDE
sir i want while condition programme
hi mudhiraj
i didn't get your doubt
get me clarity that which program do you want me to explain.
🙏🙏🙏🙏🙏🙏🙏🙏
Love you sit
even you are not sure
hi Akshit
i am sure and i will not mug up the program so i may be wrong some times so i analyse it there and explained further.
thanks for your interest towards our channel and share my sessions with your friends and subscribe to our channel.Keep following our channel.
Small modification what to do in this code
#include
int main()
{
int array[5],i, position;
printf("enter the num in index
");
for(i=0;i
I think you forgot to edit out your mistake
i want while condition syntax.
hi bhanu prasad
here i am sending the link of iterative statements
ruclips.net/video/vPfu5lXnEl8/видео.html
Plzz hindi me bhi vdo upload kree
For ( i=position -1 ; i
I watched two videos and in both there were mistakes pls sir correct these.
Why you are continuously thinking about a[4] = a[5]
🤣🤣 a[5] is not available in array of length 5 🤣🤣🤣