Arrays in C (Solved Problem 1)

Поділитися
Вставка
  • Опубліковано 11 гру 2024

КОМЕНТАРІ • 148

  • @gateprep8076
    @gateprep8076 5 років тому +82

    Your Voice is Amazing 😁 & explanation is crystal Clear.♥️

  • @more_tusharr
    @more_tusharr 5 років тому +63

    Hats Off..
    Sir, I am A Diploma student living in Bangalore, Actually I suggest all of my friends who are weak in programming to go through Neso Academy Videos, All of them are Cleared their concepts and they are thanking me for my suggestion, but they also told that the videos are till Arrays only Not pointers,Structures and Unions........and above. So we are requesting you to make videos on the above topics as early as possible sir.
    And you even told that memory layout of C program part till the Stack segment, please Explain about the Heap memory segment part also sir...
    Seriously We students need A Super teacher like you. And We will Definitely provide this video suggestion to our colleagues. Thank you so much sir.... We will Keep supporting you.

    • @vinaypratap620
      @vinaypratap620 5 років тому +1

      Bro I m bca 1st year student hii

    • @nehajaiswal3942
      @nehajaiswal3942 4 роки тому +1

      I found this channel i liked it and i suggested this to others also

  • @yenzyhebron5278
    @yenzyhebron5278 3 роки тому +17

    To anyone wondering, a formula to get size of array is:
    sizeof(arr)/sizeof(type) - 1

  • @shivu.sonwane4429
    @shivu.sonwane4429 5 років тому +5

    Everything is perfect. Presentation, explanation...&. your voice specially...👌👌😃

  • @tangarosine677
    @tangarosine677 2 роки тому +1

    wow your videos are very expilicit and i cant lie they are the best programming videos i have come acrossed

  • @masumaparvin5918
    @masumaparvin5918 4 роки тому +15

    Thanks a lot sir, ur teaching level is different and too good, i can understand easily from your lectures.. Again infinite thanks.. ☺️ Keep going sir👍😁

  • @adityamaurya9851
    @adityamaurya9851 2 роки тому +8

    3:27 Tip: Instead of writing i = 8 as the initialisation, you can write
    sizeof(a) / sizeof(a[0])
    where,
    a = name of array
    a[0] = one element of array (it can be any number but it's advisable to use zero because an array can be of one or two elements too.
    This will result in automatically fetching the total numbers of elements even if it is not given in the question.

    • @rippleyes
      @rippleyes 10 місяців тому

      can u rewrite the code in that way please

    • @carlosjames1974
      @carlosjames1974 21 день тому

      is this referring to make the user type any number? then it reverses the given numbers by the user?

  • @pabieclaudialimba8703
    @pabieclaudialimba8703 5 років тому +6

    Best lecturer

  • @DaiMoscv
    @DaiMoscv 2 роки тому +1

    And this is the elegant version:
    #define N 9
    void print(int arr[N], int i) {
    if(i < 0)
    return;
    else
    printf("%d ", arr[i]);
    print(arr, i-1);
    }

    • @diwakarkhatiwada
      @diwakarkhatiwada 2 роки тому

      I used this:
      #include
      int main()
      {
      int i=0;
      int A[9]={34,56,54,32,67,89,90,32,21};
      while(i

  • @phobic1818
    @phobic1818 4 роки тому +6

    You are a really cool teacher bruh, thanks a lot🔥

  • @anishapatil9560
    @anishapatil9560 3 роки тому +4

    I learn a whole concept of array from here thank u so much sir!

  • @Ajaykumar-rg6mb
    @Ajaykumar-rg6mb 3 роки тому +3

    Your explanation is really good. Thank you man ♥️

  • @practicalaccount2069
    @practicalaccount2069 2 роки тому +1

    you could also write
    for(i=size;i;)//while i is not 0
    printf("%d,",a[--i]);
    /*decrese i by one and then print the array, having the prefix decrease is needed since because we first decrease the index and then print since we start with i=size, which is an invalid index since array max index is size-1*/

  • @saideekshitha3431
    @saideekshitha3431 3 роки тому +1

    Super explanation and voice is very clear and superb Sir

  • @anubhavmukherjee7443
    @anubhavmukherjee7443 3 роки тому +1

    sir, you explain everything so beautifully....thanks a lot....

  • @daiaikyrmenmajaw3531
    @daiaikyrmenmajaw3531 2 роки тому +1

    Thank you sir with you best explaination ....

  • @muzamilbhat4757
    @muzamilbhat4757 Рік тому +1

    Thank you for teaching us this presentation

  • @gamermomentlive
    @gamermomentlive 3 роки тому +2

    // write the program to print the fallowing numbers in the reverse order and assume that these numbers are stored in the array.
    // 34 56 54 32 67 89 90 32 21
    #include
    int main() {
    printf("Hello world
    ");
    int arrsam[9] ={34, 56, 54, 32, 67,89,90,32,21};
    int i;
    for (i = 8; i>-1; i--)
    {
    printf("%d ", arrsam[i]);
    }

    return 0;
    }

  • @andistheinforitbutso7513
    @andistheinforitbutso7513 2 роки тому +1

    Done it by myself thanks to you Sir.

  • @639-csejjahnavi4
    @639-csejjahnavi4 4 роки тому +2

    Awesome explanation sir

  • @ritikvishwakarma2813
    @ritikvishwakarma2813 2 роки тому +2

    Thank you sir your video amazing 🤩

  • @eyongakemfritzgeraldarrey1526
    @eyongakemfritzgeraldarrey1526 5 років тому +1

    You make my teaching better

  • @tayyab.sheikh
    @tayyab.sheikh 11 місяців тому +1

    Hey Jaspreet! Please make a video on logic building in programming, we want to learn it from you.

  • @muhammadsufyan2693
    @muhammadsufyan2693 Рік тому

    Yes getting size instead of hardcoding length will be better

  • @snigdharoy1938
    @snigdharoy1938 2 роки тому +2

    Thanks a lot 😊

  • @aboutknowledge2474
    @aboutknowledge2474 5 років тому +1

    best best awesome Neso Academy

  • @ashisdixit7646
    @ashisdixit7646 5 років тому +1

    pls sir complete this course. luv u always

  • @prachisingh7468
    @prachisingh7468 5 років тому +4

    Sir please upload more videos!!!
    I m waiting!!

  • @balajishanmugavel1861
    @balajishanmugavel1861 3 роки тому +1

    Nice explanation bro....

  • @rekhachaudhary8746
    @rekhachaudhary8746 3 роки тому +1

    Really very nice... Please upload more videos on arrays problem.. I need one video on .. how to find a majority element in an array?

  • @hanifdigitalplayground634
    @hanifdigitalplayground634 21 день тому

    Sir you are great at explanation

  • @xiaoshan9722
    @xiaoshan9722 3 роки тому +1

    i code this program with macro and change the length to 15.it is really a batter way to cement

    • @jeevaalok1467
      @jeevaalok1467 3 роки тому

      Then what about initialisation of values...🤔

    • @jeevaalok1467
      @jeevaalok1467 3 роки тому

      If u don't mind send the code which u've done with macro plse

  • @karuppusamyp7081
    @karuppusamyp7081 4 роки тому +1

    Thank you so much sir
    This really helps all

  • @muskaan1537
    @muskaan1537 4 роки тому +1

    Very nice and detailed explanation thank you

  • @ghanyakhan1430
    @ghanyakhan1430 3 роки тому +1

    Very well defined 👍🏻

  • @samajahitha8377
    @samajahitha8377 3 роки тому +1

    Really amazing 👍.

  • @fadzra6689
    @fadzra6689 5 років тому +1

    Always love your videos .....

  • @marathistates
    @marathistates Рік тому

    Thanks sir online learning is always better than college 🤩👍🏻👍🏻

  • @komalrani4189
    @komalrani4189 Рік тому

    Thank you so much sir for your explanation 😊

  • @egohariomgamer9705
    @egohariomgamer9705 Рік тому

    Your video very useful thanks sir your explanation so good keep going sir❤

  • @einston1523
    @einston1523 3 роки тому +1

    Great 😀

  • @bhawnachauhan4375
    @bhawnachauhan4375 4 роки тому +1

    Thanks a lot sir

  • @Satyam_10
    @Satyam_10 4 роки тому +1

    Nice video sir

  • @xboxlox
    @xboxlox 3 роки тому

    Another way to get same result
    #include
    #include
    int arr[]= {34,56,54,32,67,89,90, 32,21} ;
    int fact (n){
    if (n== 9){ printf ("
    ");
    return;}
    printf ("%d,", arr[n]);
    fact (n +1);
    printf ("%d," arr[n]);
    int main(){
    fact (0);
    }
    Note it requires more space! 😅

  • @niveditaranjan2487
    @niveditaranjan2487 4 роки тому +4

    You are doing a great job, thankyou soo much for providing such an amazing lectures,, hats off to you....I want to ask one question i.e; what is the difference between (int main) & (void main)??

    • @Godl_Damon
      @Godl_Damon 4 роки тому

      In which class you are? Are you engineering student Or a student👦📖🎒

    • @Godl_Damon
      @Godl_Damon 4 роки тому

      I can explain. Void main is what in which we can put our code at once and can call it at any time in our int main function. It's like functions in python.

    • @niveditaranjan2487
      @niveditaranjan2487 4 роки тому

      @@Godl_Damon Thank you for your answer🙂🙂 I am persuing B.Tech 🙂

    • @jeevaalok1467
      @jeevaalok1467 3 роки тому

      @@Godl_Damon u mean it's just like fun() r8..if it's tq u for the xplaination..

    • @anubhavmukherjee7443
      @anubhavmukherjee7443 3 роки тому +1

      its basically abt the return type of the main function........int will return an integer value whereas void will return nothing..

  • @maxk9102
    @maxk9102 3 роки тому +3

    I was sitting for like 20 minutes to figure out why my code don't reverse the array. After all of that time I found out that I haven't run a function in main, because I did it in recursive way.

  • @supriyaguttula9403
    @supriyaguttula9403 2 роки тому

    thanks for the video.i uderstood very well the video.thanks for all darling..

  • @theadil1
    @theadil1 3 роки тому

    You are Gem ❤️ Love You from the core Of my heart..

  • @Anurag_Gaddamwar
    @Anurag_Gaddamwar 2 роки тому +1

    I did it😄

  • @kriscastanares5917
    @kriscastanares5917 3 роки тому +1

    Can someone explain if there is difference with this code
    this code for(i=8; i=0; i--)

  • @MrCEO-jw1vm
    @MrCEO-jw1vm 8 місяців тому

    Thanks a bunch!!

  • @rentditotemp
    @rentditotemp 2 роки тому +1

    is
    for(i=9;i>0;i++) correct also?

  • @ihsankhattakofficial154
    @ihsankhattakofficial154 4 роки тому

    Very helpfull to undersad the cocept of arry

  • @aurithrabarua4698
    @aurithrabarua4698 5 років тому

    I have gone through this kind of problem before..
    although it was fine!!

  • @我愛煮食
    @我愛煮食 4 роки тому

    thank you so much

  • @KabugoEnock-vs1nf
    @KabugoEnock-vs1nf Рік тому

    my "for" loop is different. it looks like: for(i=8; i

  • @dhaval9950
    @dhaval9950 5 років тому +1

    Please sir make a video on the subject of High voltage engineering

  • @itbase2
    @itbase2 5 років тому +1

    i did it before seeing it

  • @srinidhisrinivas517
    @srinidhisrinivas517 5 років тому +1

    Sir can u please make some more videos on string and arrays

  • @sonusambharwal8828
    @sonusambharwal8828 5 років тому

    Sir best

  • @shauryasaxena5263
    @shauryasaxena5263 3 роки тому

    Tq very much sir

  • @aasardkhan1720
    @aasardkhan1720 5 років тому

    Thank

  • @ayushkawale2017
    @ayushkawale2017 2 роки тому +1

    My return value doesn't have space between them they are 213290 so on . What to do?

  • @_Who_u_are
    @_Who_u_are 4 роки тому

    I am from Bangladesh

  • @harshitha6160
    @harshitha6160 5 років тому

    Thank you

  • @muhammadsufyan2693
    @muhammadsufyan2693 Рік тому

    Awesome

  • @true4189
    @true4189 4 роки тому

    Thank u

  • @niladritadas1908
    @niladritadas1908 5 років тому +1

    Sir , please upload the next videos soon...

  • @jacobcollins8551
    @jacobcollins8551 4 роки тому +1

    Provide a solution to teach
    pupils how to read and write
    alphabets between A and Z
    Using C language

  • @yahia1355
    @yahia1355 4 роки тому +2

    I tried these lines in java but didn't work , can someone explain to me why it didn't work :
    int array[] = {21,11,6,88,12,47};
    for(int i =0;i

  • @MolletiSaiRevanth
    @MolletiSaiRevanth Місяць тому

    Thank you so much sir your explanation is better than all of the you tubers

  • @Dynamite_77_5
    @Dynamite_77_5 Рік тому

    Sir to read the inputs we have to write scanf inside of the loop but you written printf please explain it sir 💜

  • @yonseungchoi7896
    @yonseungchoi7896 2 роки тому

    Reverse an array

  • @NOR-gate
    @NOR-gate Рік тому

    #include
    using namespace std;
    int main(){
    int arr[] = {34,56,54,32,67,89,90,32,21};
    for(int i = 0;i

  • @shivasaipatel2546
    @shivasaipatel2546 5 років тому +1

    Sir upload network theory videos sir

  • @Soumyajit_619
    @Soumyajit_619 2 роки тому +1

    Mate, how can I get a voice like you?

  • @tanuja2853
    @tanuja2853 5 років тому

    sir your explanation is very clear but i have a doubt on this video that is we have to write scanf function right but you wrote
    printf

    • @irminadaniel8711
      @irminadaniel8711 5 років тому

      a scanf function in an array is used when you want to input array values from the user, but if they're already given no need.

  • @alltimevi-logswitharun5415
    @alltimevi-logswitharun5415 5 років тому +1

    sir what condition (I=8; I

    • @bhagabatiprasad2612
      @bhagabatiprasad2612 5 років тому +2

      I think it'll be an infinite loop.

    • @irminadaniel8711
      @irminadaniel8711 5 років тому +1

      what is invalid is the condition part(i=0) because in reverse order it's supposed to go back to where it started iterating the loop and end there( to maintain the size and the order, but the later scenario is in reverse mode.

  • @JackyShaw
    @JackyShaw 5 років тому +4

    Please, Sir please complete this course. You told in the first video that you will upload the entire course fast and quickly. If not the data structures at least complete the c Programming course because only a few topics are left. Please upload fast sir I check your channel three times a day just to find that nothing new has been uploaded.

  • @muhammadkishwarraza4943
    @muhammadkishwarraza4943 3 роки тому

    Sir ya course ap c++ may kar sakty hai in urdu or hi di lngiage

  • @s66k854fh
    @s66k854fh 2 роки тому

    I an From Bangladesh. sir you?

  • @techadil5808
    @techadil5808 5 років тому

    I=array.length-1;i==0;i--

  • @muskaan1537
    @muskaan1537 4 роки тому

    Nice

  • @princemewade2154
    @princemewade2154 2 роки тому

    Ossam

  • @urmilashukla9632
    @urmilashukla9632 11 місяців тому

    In reversing u changed the value of i in 2for Loop why

  • @learnwithsaurabh7628
    @learnwithsaurabh7628 4 роки тому

    Value ham program run krne ke baad krna chahte hai kya kre

  • @boullbanehicham9239
    @boullbanehicham9239 5 років тому

    it's easy

  • @mohammademalzarifi9536
    @mohammademalzarifi9536 5 років тому

    how can use this program in function

  • @accessdenied9393
    @accessdenied9393 3 роки тому

    How we can sort them after that!

  • @technicalpradhan2936
    @technicalpradhan2936 5 років тому

    sir reverce program me 0 se start kr rha hai borland c++ software pr

  • @SaiKumar-rt9le
    @SaiKumar-rt9le 5 років тому

    👌👌👌

  • @vijayvijey2104
    @vijayvijey2104 3 роки тому

    Sir

  • @adarshparmar815
    @adarshparmar815 3 роки тому

    Sir why we have not taken any parameter

  • @srikanya1975
    @srikanya1975 3 роки тому

    hey 21 is in the 9 position

  • @karanthakur11
    @karanthakur11 2 роки тому

    First one is working fine but 2nd for loop isn't working m getting no out put

  • @vinaypratap620
    @vinaypratap620 5 років тому

    Plz sir upload fast

  • @maromaro5030
    @maromaro5030 2 роки тому

    🥰🥰🥰

  • @sahilraman3185
    @sahilraman3185 5 років тому

    upload new lectures please

  • @vijayvijey2104
    @vijayvijey2104 3 роки тому

    It coming error

  • @BWM.LIFE-FOUNDATION-tv
    @BWM.LIFE-FOUNDATION-tv 11 місяців тому +1

    I'm not get you well because of your pronounced