37 - DELETION OF AN ELEMENT FROM A SPECIFIC POSITION IN AN ARRAY - C PROGRAMMING

Поделиться
HTML-код
  • Опубликовано: 14 янв 2025

Комментарии • 142

  • @ayanmukherjee4891
    @ayanmukherjee4891 3 года назад +22

    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 ✌

  • @fahadhos
    @fahadhos 5 лет назад +2

    correct code is
    int i,a[100],pos,n;
    printf("enter number:
    ");
    scanf("%d",&n);
    for(i=0; i

  • @srinivasaraorolla377
    @srinivasaraorolla377 4 года назад +4

    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.

  • @rajbhargav8947
    @rajbhargav8947 5 лет назад +13

    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

  • @littletouchoflove
    @littletouchoflove 5 лет назад +19

    Sir u haven't accepted the position from the user
    1 line missing that's- scanf("%d",&position);

  • @syedsaadali326
    @syedsaadali326 6 лет назад +23

    Great teacher ❤. You've fans/followers in Pakistan too

  • @Mark-dq4kg
    @Mark-dq4kg 4 года назад +9

    Got a bit confused 😬, but you're sincere . Great explanation and I subbed :-) love from France
    "Merci beaucoup" ;-)

  • @venkataramsai3226
    @venkataramsai3226 3 года назад +8

    I didn't see this kind of wonderful teaching and explanation ❤️❤️❤️❤️. But so sad that subscribers are very less. All the best sir❤️❤️❤️❤️👍👍👍👍👍.

  • @Shietaehyung
    @Shietaehyung 3 года назад +1

    Great teacher that I have ever seen in my life . Best of wishes sir.

  • @ethanpittman4966
    @ethanpittman4966 5 лет назад +2

    Nice video! Straight to the point and easy to follow. Thanks!

  • @moropaneedwin4915
    @moropaneedwin4915 6 лет назад +3

    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

    • @sundeepsaradhi
      @sundeepsaradhi  6 лет назад +1

      hi
      thanks for your interest and support towards our channel. keep on following my sessions.

  • @057asifurrahmanrahat9
    @057asifurrahmanrahat9 3 года назад

    Great teacher..Love and respect from Bangladesh

  • @bobbybindela1959
    @bobbybindela1959 3 года назад +5

    Sir shouldn't we write i

  • @ganeshjaggineni4097
    @ganeshjaggineni4097 2 года назад

    NICE SUPER EXCELLENT MOTIVATED

  • @krishnapooja7837
    @krishnapooja7837 3 года назад +1

    Sir this is user defined function nd also in this there is an error. You r not assigned any value of position

  • @Viswam_34
    @Viswam_34 4 года назад

    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

  • @sanikamane5627
    @sanikamane5627 2 года назад

    Nice teaching sir✌️

  • @Imranbof
    @Imranbof 3 года назад

    Awesome. I'm learning from Bangladesh

  • @manasabhat2618
    @manasabhat2618 4 года назад +1

    How is it deleted? If we print i[5],itll also gv same value of i[4],as it was just equated.

  • @Parikarthik369
    @Parikarthik369 2 года назад

    Tq so much sir I can saw all the videos related ds really so good and clear understanding

  • @bollywoodnews2124
    @bollywoodnews2124 2 года назад

    sir u shifted the rightmoste element to left but the numbr not deleted from the position
    please tell me if i am wrong

  • @kamalveduruparthi8356
    @kamalveduruparthi8356 6 лет назад +2

    We haven't deleted a[5] completely can't we do that using this concept???

  • @yarramneninikhil1299
    @yarramneninikhil1299 5 лет назад +1

    Sir u did not delete the element,snd didn't accept the position.

  • @gamingzone-ge4sw
    @gamingzone-ge4sw 2 года назад

    How would you know that position is itrator but not a nunber

  • @SonaliProgrammingHub
    @SonaliProgrammingHub 2 года назад

    Nice Course

  • @kathyayinimj5392
    @kathyayinimj5392 6 лет назад +4

    sir pls let me know with a program how to remove duplicate charactors from string

  • @saurabhpatil5178
    @saurabhpatil5178 2 года назад

    Very Nice Sirji

  • @bobbybindela1959
    @bobbybindela1959 3 года назад +1

    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

    • @siliconvalley3271
      @siliconvalley3271 3 года назад

      To delete last element ::--
      In printing for loop we take n-1 i.e
      for(i=0;i

  • @khushalverma984
    @khushalverma984 3 года назад

    Sir you explanation is great and easy to understandable, thankyou sir
    Love from m.p.

  • @snehaelizebeth6146
    @snehaelizebeth6146 5 лет назад

    Sir,value of position is not accepted from the user.

  • @yogionutube
    @yogionutube 6 лет назад

    Great video to understand something

  • @abhilashsingh7258
    @abhilashsingh7258 9 месяцев назад

    Hes so innocent 😭❤

  • @soumyaranjansatpathy5209
    @soumyaranjansatpathy5209 6 лет назад +2

    Nice video sir... keep doing the same..

    • @sundeepsaradhi
      @sundeepsaradhi  6 лет назад

      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.

  • @dipukanchan3312
    @dipukanchan3312 4 года назад

    Wah sir... Very nice

  • @ankitgiri3452
    @ankitgiri3452 4 года назад

    Good explanation! Thank you sir

  • @senthilvel2629
    @senthilvel2629 6 лет назад +1

    Hello sir, you didn't mention input for position (scanf). For secound for loop initiation

  • @rahulreddy6207
    @rahulreddy6207 3 года назад

    Sir this program is not completed. the output is not coming

  • @omniaarafat2512
    @omniaarafat2512 3 года назад

    What about the index which l want to delete is the last element.. what can I do... isn't it regarded a bug ?

  • @sudhakarivfhao
    @sudhakarivfhao 3 года назад

    Why it is not executing correctly if we entered array elements directly
    But if i use scan it is executing correctly

  • @bvlog5975
    @bvlog5975 3 года назад

    Thanks for this vedio sir very doubts are cleared

  • @sdrana4486
    @sdrana4486 6 лет назад +1

    Would you please make a video on insertion and deletion of elements in a 2-D array..I am facing problem in doing so..

  • @krupalathapelluru9680
    @krupalathapelluru9680 6 лет назад +1

    Nice teaching sir .... very understandable teaching

    • @sundeepsaradhi
      @sundeepsaradhi  6 лет назад

      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.

  • @geethanidhi4731
    @geethanidhi4731 5 лет назад

    sir i have executed your code but output is not showing anything it is showing a blank screen sir

  • @BeingCrazy
    @BeingCrazy 6 лет назад +1

    Sir position kha print ho rhi h.. program m.. ya fix kr di

    • @sundeepsaradhi
      @sundeepsaradhi  6 лет назад

      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.

  • @amanbhavsar9762
    @amanbhavsar9762 6 лет назад +2

    Just awesome 👌
    Keep doing the same sir
    👍

    • @sundeepsaradhi
      @sundeepsaradhi  6 лет назад

      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.

  • @BALAJIBMSC
    @BALAJIBMSC 7 лет назад +2

    you missed to assign position value in the program sir.. nice lecture

  • @instrasighnentcobra9890
    @instrasighnentcobra9890 Год назад +1

    For the 2nd for loop, it should be i = position -1 and not i = position

    • @yashedits3466
      @yashedits3466 Год назад

      Ya bro , sir ne index delete Kiya hai position delete karne ke liye i=p-1 karna padenga

  • @ask294-d9f
    @ask294-d9f 4 года назад

    for the end position how will it delete?

  • @jaganmohini3642
    @jaganmohini3642 6 лет назад

    Can u even use decrement here . If we can use decrement.How?

  • @nagarajukola
    @nagarajukola 2 года назад +1

    Sir, Can you please share me the 1st video link, so that I can continue from basic C course.. please

    • @sundeepsaradhi
      @sundeepsaradhi  2 года назад

      ruclips.net/p/PLLOxZwkBK52AE9jFVOGZTJxaiAC_xB8Yy

  • @srikarbokka7403
    @srikarbokka7403 4 года назад +1

    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

    • @sundeepsaradhi
      @sundeepsaradhi  4 года назад

      Hi
      If possible send me your program to My email
      askme.selflearning@gmail.com

  • @WADIZEABTVHD
    @WADIZEABTVHD 6 лет назад +2

    how can I remove the element completely from memory locations ?

    • @sundeepsaradhi
      @sundeepsaradhi  6 лет назад +1

      hi
      we have to use pointers and allocate the memory dynamically. then we can remove the memory locations after their use.

    • @WADIZEABTVHD
      @WADIZEABTVHD 6 лет назад +1

      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 ?.

  • @mdyousufgazi4030
    @mdyousufgazi4030 4 года назад

    thank you so much for the video

  • @devaryan2201
    @devaryan2201 5 лет назад +1

    Legend sir... Tommorow is my end semister examination it will really help me ...tysm 😊

  • @RiddleRoomMaster
    @RiddleRoomMaster 6 лет назад +1

    Sir u r not assigned value of position!

  • @benschi9240
    @benschi9240 7 лет назад +1

    Thanks man. You are a god

    • @sundeepsaradhi
      @sundeepsaradhi  7 лет назад

      hi ben
      thanks for your interest towards our channel.

  • @dee-ker5867
    @dee-ker5867 5 лет назад

    great teacher

  • @RoyoItakoride
    @RoyoItakoride 5 лет назад

    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

  • @riyasharma-ps5he
    @riyasharma-ps5he Год назад

    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]

  • @mounikaranireddyreddy6748
    @mounikaranireddyreddy6748 5 лет назад +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

  • @believer3423
    @believer3423 3 года назад +1

    Out put of this program???I want

  • @techieadi4377
    @techieadi4377 7 лет назад +2

    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.

    • @Nk-wq4fk
      @Nk-wq4fk 6 лет назад

      your classes is very interesting
      very nice sir

  • @rahuljangir3645
    @rahuljangir3645 4 года назад

    Thank you very much sir

  • @ramuganesan
    @ramuganesan 4 года назад

    sir, i is assigned to 2 in the second for loop?

  • @priyakapoorr1104
    @priyakapoorr1104 6 лет назад

    Brillient sir

  • @srinivasaraorolla377
    @srinivasaraorolla377 4 года назад

    can please tell about insertion of array for tracing

  • @ganeshakkala9330
    @ganeshakkala9330 3 года назад

    Sir u didn't read the position

  • @BilalKhan-lk6bb
    @BilalKhan-lk6bb 6 лет назад

    why did we assign i=postion in second for loop?

  • @SmartProgramming
    @SmartProgramming 6 лет назад

    awesome explanation sir, keep it up, great 👍🙂👍👍👍🙂🙂🙂

  • @mohamedbenlmaoujoud486
    @mohamedbenlmaoujoud486 5 лет назад

    thnx from morocco

  • @pkallinone1254
    @pkallinone1254 6 лет назад

    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..

    • @_sspk_
      @_sspk_ 5 лет назад

      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

  • @rohan6827
    @rohan6827 6 лет назад +2

    Correct it guys
    for(i=position-1;i

    • @skrishnakishore1946
      @skrishnakishore1946 5 лет назад

      In that case the element before the position will also be deleted

  • @afrinakter7372
    @afrinakter7372 4 года назад

    output ?

  • @Sameera693-g3z
    @Sameera693-g3z 4 месяца назад

    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 ❤

  • @Snugglelol
    @Snugglelol 7 лет назад +2

    This was useful

    • @sundeepsaradhi
      @sundeepsaradhi  7 лет назад +1

      hi
      thanks for your support towards our channel.

  • @-Anish
    @-Anish 4 года назад

    Sir your program is pre defined.pls do user defined program on deletion

  • @adapavijayalakshmi3727
    @adapavijayalakshmi3727 4 года назад

    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

  • @ravijaiswal9231
    @ravijaiswal9231 4 года назад +4

    Sir again you forgeted some thing 😂🤣 that is to scanning the position in coding!

    • @jollyllb9159
      @jollyllb9159 4 года назад +3

      Its ok , everybody makes mistake .

    • @chandratiwari3707
      @chandratiwari3707 4 года назад +10

      And you forgot that it's forgot not forgeted 😄😄

  • @taklafakla2808
    @taklafakla2808 7 лет назад +1

    Thank you sir ...☺

    • @sundeepsaradhi
      @sundeepsaradhi  7 лет назад

      hi takla
      thanks for watching and supporting our channel.

  • @Nope_ER
    @Nope_ER 10 месяцев назад

    Maja agya bhai

  • @Raam1827
    @Raam1827 Год назад

    Better to use a variable size after deletion of array you perform decrement operation than size is decreased

  • @leemmoo
    @leemmoo 7 лет назад +1

    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?

    • @sundeepsaradhi
      @sundeepsaradhi  7 лет назад +5

      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.

  • @malasinha1037
    @malasinha1037 5 лет назад

    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

  • @vishalrai6027
    @vishalrai6027 6 лет назад +1

    thanks sir😁

    • @sundeepsaradhi
      @sundeepsaradhi  6 лет назад

      hi Vishal
      thanks for watching my sessions and your interest and support towards our channel.

  • @kavinkumar-gv6xp
    @kavinkumar-gv6xp 5 лет назад

    For(I=0;i

    • @ShivamSharma-vv2jt
      @ShivamSharma-vv2jt 5 лет назад

      No it is not correct.
      For ( i= 0;i>=position;i--) is correct

    • @satyaprakashmohanty1017
      @satyaprakashmohanty1017 4 года назад

      @@ShivamSharma-vv2jt i=3 rest is all correct

    • @satyaprakashmohanty1017
      @satyaprakashmohanty1017 4 года назад

      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.

  • @PardeepSingh-wj8lc
    @PardeepSingh-wj8lc 5 лет назад

    Nycc sir

  • @lakshaysharma8919
    @lakshaysharma8919 6 лет назад +2

    I think array[i]=[i+1]is wrong we have to right [i-1]at the place of [i+1]?because values are decreasing...

    • @sundeepsaradhi
      @sundeepsaradhi  6 лет назад

      hi Mask
      once compile the program and i have done it and it works correct.
      if you still find difficulty let me know.

    • @tuneerbiswas929
      @tuneerbiswas929 6 лет назад

      Sir if i write the logic as
      for(i=n; i>position;i--)
      a[i]=a[i-1] will it be wrong??

  • @manojkiran5730
    @manojkiran5730 5 лет назад

    Thank you sir

  • @vamsipappala2707
    @vamsipappala2707 3 года назад

    If u don't mine plz show the working process and out put in IDE

  • @infinity9618
    @infinity9618 7 лет назад +1

    sir i want while condition programme

    • @sundeepsaradhi
      @sundeepsaradhi  7 лет назад

      hi mudhiraj
      i didn't get your doubt
      get me clarity that which program do you want me to explain.

  • @dontwatch5389
    @dontwatch5389 5 лет назад

    🙏🙏🙏🙏🙏🙏🙏🙏

  • @dontwatch5389
    @dontwatch5389 5 лет назад

    Love you sit

  • @akshitsharma5804
    @akshitsharma5804 6 лет назад +2

    even you are not sure

    • @sundeepsaradhi
      @sundeepsaradhi  6 лет назад +3

      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.

  • @ChandraRohith-l1v
    @ChandraRohith-l1v Год назад

    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

  • @fusionbolt18
    @fusionbolt18 5 лет назад +1

    I think you forgot to edit out your mistake

  • @infinity9618
    @infinity9618 7 лет назад +1

    i want while condition syntax.

    • @sundeepsaradhi
      @sundeepsaradhi  7 лет назад

      hi bhanu prasad
      here i am sending the link of iterative statements
      ruclips.net/video/vPfu5lXnEl8/видео.html

  • @SSThakur-ud4qw
    @SSThakur-ud4qw 2 года назад

    Plzz hindi me bhi vdo upload kree

  • @2tvlog199
    @2tvlog199 2 года назад

    For ( i=position -1 ; i

  • @RITESHKUMAR-co7uf
    @RITESHKUMAR-co7uf 6 лет назад

    I watched two videos and in both there were mistakes pls sir correct these.

  • @priyeshpandey7128
    @priyeshpandey7128 2 года назад

    Why you are continuously thinking about a[4] = a[5]
    🤣🤣 a[5] is not available in array of length 5 🤣🤣🤣