Pointer Application (Finding the Largest & Smallest Elements in an Array)

แชร์
ฝัง
  • เผยแพร่เมื่อ 30 พ.ย. 2024

ความคิดเห็น • 156

  • @aamirnaved4331
    @aamirnaved4331 4 ปีที่แล้ว +20

    You can also use tertiary operator;
    for (int i = 1; i < len; i++)
    {
    *max = *max > arr[i] ? *max : arr[i];
    *min = *min < arr[i] ? *min : arr[i];
    }

    • @GKNaidu-hb5zv
      @GKNaidu-hb5zv 3 ปีที่แล้ว +1

      bro its ternary

    • @boredash4020
      @boredash4020 4 หลายเดือนก่อน +1

      @@deepaktechk basically saying if the condition does not match the value should remain the same

    • @deepaktechk
      @deepaktechk 4 หลายเดือนก่อน

      @@boredash4020 I mean it's already in there, the code are de-reference the value in that pointer and assigning to the same variable again, it's a waste of CPU and RAM cycle,
      You can do like this, it will avoid unnecessary assignment
      for (int i = 1 i < len; i++)
      {
      if (ary[i] < *min)
      *min = ary[i];
      else if (ary[i] > *max)
      *max = ary[i];
      }

  • @1bmxam
    @1bmxam 4 ปีที่แล้ว +18

    You did what my community college c programming class does in 3 hours. Seriously, I have an outrageous teacher who couldn’t cover what you covered in our 3 hour long class

  • @JasonRobards2
    @JasonRobards2 4 ปีที่แล้ว +58

    I finally understand pointers.

  • @menheraflessia
    @menheraflessia 3 ปีที่แล้ว +15

    I really couldn't understand pointers until I found your videos. Thank you so much for such an awesome content!

  • @uniqueelsa5959
    @uniqueelsa5959 3 ปีที่แล้ว +46

    I couldn't stop myself from commenting, even by pausing the video, it's really awesome !! No one could explain better than this!
    So impressive and useful ❤

    • @shivakarthikrathod2026
      @shivakarthikrathod2026 3 ปีที่แล้ว

      code with harry yt channel

    • @sirluoyi2853
      @sirluoyi2853 2 ปีที่แล้ว

      You are impatient.
      You should have commented only after watching the full video.
      Though your remark is very true, but still it is the sign that you lack patience.

  • @aaronwang4868
    @aaronwang4868 4 ปีที่แล้ว +4

    This is the exact video that helps me understand what the pointer means. Thanks for such a genius instructor!

  • @mdshahporan9069
    @mdshahporan9069 2 ปีที่แล้ว +6

    Finally, pointer entered into my brain.
    Thank you ♥

  • @hhcdghjjgsdrt235
    @hhcdghjjgsdrt235 2 ปีที่แล้ว +2

    I finally understand the difference between calling by value and calling by reference.

  • @muhammadfouad1792
    @muhammadfouad1792 5 ปีที่แล้ว +43

    First of all, your effort in recording and uploading these useful videos is appreciated. Secondly, I think we need some videos on structures, unions, bit fields and enums with as many extensive examples as you can.
    Thirdly, could you please include some videos explaining the strings in C ? as you have already talked about arrays and pointers, in order to be more valuable.
    And thank you again for the obvious effort!

  • @AdrianTregoning
    @AdrianTregoning 2 ปีที่แล้ว +2

    Gee your videos are GOLD. I'm starting to understand pointers quite well going through everything. Thanks for the effort, it is much appreciated.

  • @sebastiandancourt2612
    @sebastiandancourt2612 4 ปีที่แล้ว +2

    This was fantastically explained, awesome tutorial, greetings from the United States.

  • @aminazakaria-t1v
    @aminazakaria-t1v 6 หลายเดือนก่อน +1

    Thank you for all your hard work, your videos are an excellent source for learning C.

  • @Ankit-mq6em
    @Ankit-mq6em 5 ปีที่แล้ว +15

    Whoever you are ,doing great work and hope u will upload more questions sets in order to cement the concepts for us .Thank u soo much ,you are inspiration and a great teacher as well as communicator who is able to explain information very very very great manner even a IITian can't explain like that

  • @muhammadehsan7796
    @muhammadehsan7796 9 หลายเดือนก่อน

    the best ever video i have ever seen on pointers

  • @wecode007
    @wecode007 10 หลายเดือนก่อน +1

    the video was good but i think bubble sort was suitable for this

  • @Mainakde908
    @Mainakde908 2 หลายเดือนก่อน

    Thanks for such crystal clear clarifications on this topic... Concepts of pointers are there in our class 11-12 syllabi and I was having many doubts.... Most of them are getting resolved after watching every video in this series. Thank you again...

  • @prathmeshpawar5591
    @prathmeshpawar5591 4 ปีที่แล้ว +3

    All videos clearify our basic concepts of C .......thanks to encourage us and make these videos free for everyone ❣️

  • @abhayprajapati3084
    @abhayprajapati3084 5 ปีที่แล้ว +2

    Sir please provide the complete lecture as early as possible. Thanku for great content.😊😊

  • @shreeshaalevoor4524
    @shreeshaalevoor4524 ปีที่แล้ว +1

    sir didn't understand why len=sizeof(a)/sizeOf (a[0]); if we do like that we get length is equal to 0

  • @shashankkalyani5135
    @shashankkalyani5135 3 ปีที่แล้ว +1

    U nailed it Sir.... Excellent

  • @carzycults6119
    @carzycults6119 3 ปีที่แล้ว +31

    I was asked in interview for mnc company, why we go for pointers when we have normal variables?

    • @snehalsardesai
      @snehalsardesai ปีที่แล้ว +5

      Plz Giv ans for this question

    • @vishnu1156
      @vishnu1156 ปีที่แล้ว +1

      It makes the compilation fast

    • @martinsantiago7900
      @martinsantiago7900 ปีที่แล้ว +1

      @@vishnu1156 thanks bro

    • @yashyadav1926
      @yashyadav1926 ปีที่แล้ว +2

      Because it make changes to the actual variables in main function

    • @prashanth9309
      @prashanth9309 ปีที่แล้ว +7

      ​@@snehalsardesaipointers save memory space

  • @AbhishekSingh-xg3zj
    @AbhishekSingh-xg3zj ปีที่แล้ว +1

    Awesome explanation ❤💯. Keep up the good work.

    • @cqwshi
      @cqwshi ปีที่แล้ว

      brother,can you explain me please why'd he use pointers ?

  • @soumi6720
    @soumi6720 2 ปีที่แล้ว

    hats off to neso academy. excellent content

  • @rohithtechnicalkr4873
    @rohithtechnicalkr4873 5 หลายเดือนก่อน +1

    Is it work for negative numbers??

  • @laarifsoufyan7103
    @laarifsoufyan7103 5 ปีที่แล้ว +5

    Please ad the subtitles (in english)

  • @KadenCasanave
    @KadenCasanave 6 หลายเดือนก่อน

    enlightening. Thank you very much!

  • @navjotkaur5100
    @navjotkaur5100 4 ปีที่แล้ว

    This video helped me a lot, It solved my problem. Thank you.

  • @nishanthrajan3360
    @nishanthrajan3360 ปีที่แล้ว

    Beautiful explanation! thank you very much

  • @awesomearchit111
    @awesomearchit111 5 ปีที่แล้ว +1

    Sir please complete lectures of signal and system

  • @vidyabukitgar
    @vidyabukitgar 5 ปีที่แล้ว +4

    Why have you divided sizeof(a) by sizeof(0) to find length of array

    • @sairupesh1344
      @sairupesh1344 5 ปีที่แล้ว +16

      the question is wrong :: he divided sizeof(a) by sizeof(a[0])
      answer:: the sizeof(a) returns the size of the whole array in bytes which is 56 ,and the sizeof(a[0]) returns the size of single integer element in the array which is 4 dividing the both will result in the actual size of the array which is 14..... count the elements in the array if you want.
      the size of integer will change by compiler to compiler.
      hope you understand TC : )

    • @kamalkishor1493
      @kamalkishor1493 4 ปีที่แล้ว +2

      @@sairupesh1344 thanks buddy I was confused on that .... Because I didn't see before it ...

    • @bharathkumars8535
      @bharathkumars8535 4 ปีที่แล้ว

      See his old videos posted related to arrays

    • @dsdcp
      @dsdcp 4 ปีที่แล้ว

      in order to the count be exactly with the type of data you want to count.

    • @rajkumarsambhare4519
      @rajkumarsambhare4519 2 ปีที่แล้ว +1

      sizeof() gives size in bytes . Hence , we have to divide it by the size of datatype . Sir has explained it in previous videos .

  • @rayeesuraj7190
    @rayeesuraj7190 3 ปีที่แล้ว +3

    Thanks a Lots Sir.. ❤️❤️.
    But, Sir I have a doubts that when you declare the minMax() in line no 5, the name of array passed as parameters is arr[ ].
    While in the line no 19, 21 and 22 the name of the same array is a[ ].
    Doesn't it produce it any errors ???

  • @im.meer-asif
    @im.meer-asif 5 ปีที่แล้ว +2

    Hope.you will start python too, a great scope these days

    • @mbadar4093
      @mbadar4093 5 ปีที่แล้ว +3

      C++ is again NO 1 Language by ranking

    • @hetaeramancer
      @hetaeramancer 3 ปีที่แล้ว

      @@mbadar4093 Java is no 1

  • @ssr6948
    @ssr6948 2 ปีที่แล้ว +1

    sir, in every video till now first we initialized a variable and a pointer separately. then we assigned the value to the pointer.
    ex :
    int max = 100
    int *ptr = &max
    However, in this case, I noticed that you had a variable called max and you directly wrote *max as the pointer which points the variable. you didn't do this -
    int max = 100
    int *max = &max
    SO, are both approaches same?

    • @ssr6948
      @ssr6948 2 ปีที่แล้ว +1

      ok, got the answer to my problem. you passed the memory addresses of max and min to maxmin function and that's how the pointers got initialized.

  • @ozgeylmaz8685
    @ozgeylmaz8685 ปีที่แล้ว

    thank you so so much you are the best

  • @RahulKumar-qu1if
    @RahulKumar-qu1if 5 ปีที่แล้ว +1

    Sir please upload video upon binary tree in data structure..

  • @raviteja2411
    @raviteja2411 4 ปีที่แล้ว +1

    In the idea, it is the mistake that in 2nd condition you mentioned arr[i] in the place of a[i];
    So, Please edit it...

  • @Ankit-mq6em
    @Ankit-mq6em 5 ปีที่แล้ว +1

    I request u to cover gate syllabus completely for this data structures and algorithms and c thank u

  • @daenas3351
    @daenas3351 2 ปีที่แล้ว

    Thx man, you explannation is dope 😉

  • @Codality
    @Codality 4 ปีที่แล้ว +1

    Hi Neso Academy,
    I would like to thank a lot for your works on all the Video, it's really such a great Academy.
    I want to ask a question about the example :
    you wrote : void minMax(int arr[], int len, *min, int *max)
    .
    .
    .
    minMax(a, len, &min, &max)
    But can we write :
    void minMax(int arr[], int len, *min, int *max)
    .
    .
    .
    minMax(a, len, &Largest, &Smallest)
    ??
    I mean it should be the same words between the void function and in the main function ??
    Thx in advance.

    • @45vishwanikothoju39
      @45vishwanikothoju39 4 ปีที่แล้ว

      yeah....same doubt

    • @samdavepollard
      @samdavepollard 4 ปีที่แล้ว +2

      your second way of writing it is fine
      when we call a function, the names of the parameters we pass in don't have to be the same as the names in the function definition (if they did have to be the same, that would make the function a bit less useful)
      (the important thing is that the types of variables in the function call have to exactly match the types in the function definition but I'm sure you know that, and that wasn't what you were asking)

  • @58_rejaul_mallik76
    @58_rejaul_mallik76 4 ปีที่แล้ว +1

    Can I use strlen() for determining the length of array

  • @manilavaswani154
    @manilavaswani154 4 ปีที่แล้ว +1

    Sir we can find min and max using normal functions also..so why pointer i mean what is the difference using pointer and functions please explain..

    • @FaisalKhan-ce2qu
      @FaisalKhan-ce2qu 4 ปีที่แล้ว

      you can always write a program in your own million ways but what he was trying to explain was the use of pointers specifically in a situation like this where you want to change the value for the variables. For better understanding see a lecture on call by reference and call by value.

    • @sanjairs6934
      @sanjairs6934 3 ปีที่แล้ว

      Just u know Its Application.
      And for reusability we can create function and calls whenever we want

  • @ll.cvxz_vloges
    @ll.cvxz_vloges ปีที่แล้ว

    Thank you.. really thanks
    I love you bro 😂😂❤❤

  • @PrinceKumar-ux3qm
    @PrinceKumar-ux3qm 5 ปีที่แล้ว

    Sir please upload videos on computer organization and architecture🙏🙏🙏🙏🙏🙏

  • @marduktr
    @marduktr 4 ปีที่แล้ว

    Thank you sir for this video.

  • @jennedanial8664
    @jennedanial8664 4 ปีที่แล้ว +1

    why code blocks doesn't give any output for pointers
    # Windows

  • @rajeshmeher4017
    @rajeshmeher4017 5 ปีที่แล้ว

    Please sir make a video series on communication system. It will be very helpful to us. We couldn't found proper video for communication in any other channel so please sir help us

  • @im.meer-asif
    @im.meer-asif 5 ปีที่แล้ว +1

    awsome..as always

  • @rajeshwaris6663
    @rajeshwaris6663 4 ปีที่แล้ว

    Protip return multiple values using arrays

  • @pravanjanpanda3964
    @pravanjanpanda3964 3 ปีที่แล้ว

    in the 1st explanation i.e using for loop what will happe3if both the values became equal

  • @Aandrudu
    @Aandrudu 3 ปีที่แล้ว

    Thankyou neso academy

  • @matteopiccioni196
    @matteopiccioni196 ปีที่แล้ว

    very educational, worth more than hours of not very useful lessons

  • @harshitkaushik6276
    @harshitkaushik6276 2 ปีที่แล้ว

    Thanks a lot

  • @KNoshithaDevi
    @KNoshithaDevi 3 ปีที่แล้ว

    Here in condition i

  • @hariharabogaram1008
    @hariharabogaram1008 4 ปีที่แล้ว

    Can we use pointers to array??

  • @berk26092
    @berk26092 3 ปีที่แล้ว

    Thank you sir

  • @kamalkishor1493
    @kamalkishor1493 4 ปีที่แล้ว +1

    Sir why did you use arr[ ] in user define function but in main function it is different a[ ] ...
    Why sir plz explain plz plz plz ...
    And can I take same in both function .. ??

    • @sairupesh1344
      @sairupesh1344 4 ปีที่แล้ว +2

      he used "arr[ ]" in user define function to receive array a[ ] from main function.
      you can use any name to receive data from main function because the scope of the variable.
      if you don't know about scope look it up.
      and yes you can also use same in both function but it is a good pratice to use different and meaning full name for variables because interviews are strict about variable names,indentation etc : )

    • @kamalkishor1493
      @kamalkishor1493 4 ปีที่แล้ว +1

      @@sairupesh1344 thanks

    • @deejayVaibh
      @deejayVaibh 4 ปีที่แล้ว

      @@sairupesh1344 bro but int a[ ] is used in main body so how it can be used as global variable??

  • @AmitKumar-eh8ys
    @AmitKumar-eh8ys 3 ปีที่แล้ว

    Best content 🔥🔥

  • @missoumyoucef4604
    @missoumyoucef4604 3 ปีที่แล้ว

    thank you

  • @manjunathmajety
    @manjunathmajety ปีที่แล้ว

    Can someone clarify my doubt here, what's the need of using pointers in the minmax example ? Like I've done the same without pointers, but I got a different answer. Reason ?

  • @divyaagarwal3091
    @divyaagarwal3091 3 ปีที่แล้ว

    Thankyou sir

  • @mohiuddinkhanmahin
    @mohiuddinkhanmahin 3 ปีที่แล้ว +1

    can anyone explain a little why "void minmax" is written , I've always coded with "int minmax" . can anyone point me the differences between void and the int. i know its related with the return type, but still thereis much confusion.

    • @kayraozbakir9517
      @kayraozbakir9517 2 ปีที่แล้ว

      Same:/

    • @AdrianTregoning
      @AdrianTregoning 2 ปีที่แล้ว

      @Mahin Khan void means it doesn't return anything. And the function minmax does not. It simply changes min and max in the main function via pointers.

  • @randompotato3122
    @randompotato3122 10 หลายเดือนก่อน

    I now understand this topic, but I don't know why is it intended to be done in this way? in other programming languages you just pass the array to the function and the length,min,max could be defined as a part of the function itself and in the end you could return the value of min,max and then in the main function you just call the function minMax and store it's values in new min max variables and the code become cleaner from my point of view? Am I thinking in the wrong way here ? could this be done in C? I'm not sure if a function can return 2 values, but it has to be possible inside an object or something.

  • @sumathik9779
    @sumathik9779 4 ปีที่แล้ว

    Awesome channel amazing

  • @mauryaashish1865
    @mauryaashish1865 3 ปีที่แล้ว +1

    Why the name of array in function call(name of array 'a') and function definition(arr) is different??

    • @santhoshsiva281
      @santhoshsiva281 3 ปีที่แล้ว

      I also have the same doubt

    • @006daredevil
      @006daredevil 3 ปีที่แล้ว

      @@santhoshsiva281 because arr is an array which acts as a pointer which points to a.

  • @fouadmenani1132
    @fouadmenani1132 4 ปีที่แล้ว

    but sir the len variable is declared in the main function , how can we use it in the minmax fun , and we're not using it as pointer so that shouldnt be possible please explain

    • @006daredevil
      @006daredevil 3 ปีที่แล้ว

      because it's pass by value we are passing value of len variable to void function which creates another copy of len variable with same value.

  • @harmankaur3938
    @harmankaur3938 2 ปีที่แล้ว

    meko ek doubt hai ki a[ ] ko function mein arr [ ] kyun use kiya

  • @rajkumarsambhare4519
    @rajkumarsambhare4519 2 ปีที่แล้ว

    Sir , you have not declared minMax here , I tried doing the program , it was showing error saying that minMax is an undeclared identifier. Please explain sir .

  • @nandiniveddampuri73
    @nandiniveddampuri73 4 ปีที่แล้ว

    Sir....then what is the difference between pointers and call by reference in c.....I'm not getting..plz expalin

  • @true4189
    @true4189 4 ปีที่แล้ว

    Thank u

  • @ChandanRaj-tq6fc
    @ChandanRaj-tq6fc 3 ปีที่แล้ว

    sir, where is the arr array declared and initialised?

    • @ankitpoudel9875
      @ankitpoudel9875 ปีที่แล้ว

      Ohh finally I get it I was also confused at first, he has declared func name minmax where elements of array a will be passed to arr array.. I was also fucked at first time now I have realized..

  • @narayanavedula7079
    @narayanavedula7079 4 ปีที่แล้ว

    sir, can we not specify the size of the array in initializing it???

  • @snehalsardesai
    @snehalsardesai ปีที่แล้ว

    5 value of *p

  • @shivamuttam9868
    @shivamuttam9868 5 ปีที่แล้ว

    Hello sir
    I haive doubt
    What will be the output
    printf("%d","");
    Output is 173 but how
    This question was asked in my bca exam
    Plz help me sir

  • @Chikowski101
    @Chikowski101 3 ปีที่แล้ว

    why can't I use the sizeof() instead of creating that variable len ?

    • @rajkumarsambhare4519
      @rajkumarsambhare4519 2 ปีที่แล้ว

      sizeof() gives size in bytes . Hence , we have to divide it by the size of datatype . Sir has explained it in previous videos .

  • @jeee3t
    @jeee3t 3 ปีที่แล้ว

    Actually i didn't understood why sir has not declare the function above int main() ?????? Anyone ?

  • @54_a_aayushbhat85
    @54_a_aayushbhat85 4 ปีที่แล้ว

    Output =5

  • @IIM_life_by_Divya
    @IIM_life_by_Divya 4 ปีที่แล้ว

    sir shouldn't we write our main program first and later function
    I have tried in that way compiler is showing " Int I is not defined"
    please reply sir

    • @joeljacob4685
      @joeljacob4685 4 ปีที่แล้ว

      No it is not necessary as the compiler first goes into the main program by default and when we call the function at that time the control goes to the function

    • @joeljacob4685
      @joeljacob4685 4 ปีที่แล้ว

      Have you declared function prototype when you wrote main program first and then function.

  • @Codality
    @Codality ปีที่แล้ว

    Here is a simplified version :
    ""
    #include
    int main()
    {
    int a[] = {23, 45, 6, 98};
    int min, max;
    min = max = a[0];
    for (int i = 1; i < 3; i++)
    {
    if (a[i] < min)
    {
    min = a[i];
    }
    if (a[i] > max)
    {
    max = a[i];
    }
    }
    printf("max = %d
    ", max);
    printf("min = %d
    ", min);

    }
    ""
    Output ;
    ""
    max = 45
    min = 6
    ""

    • @Mainakde908
      @Mainakde908 2 หลายเดือนก่อน

      Yes, it's one of the simplest possible programs for this objective.. But I think he explained this simple case by using functions and pointers so that later, we feel comfortable with such things for even more complex programs.

  • @soulefsed5832
    @soulefsed5832 3 ปีที่แล้ว

    i cannot understand why you did &min and &max when you called the function

  • @foopfoop4323
    @foopfoop4323 ปีที่แล้ว

    This video was hella confusing. IMO you should type the code with us(That is better for me). But great video !

  • @mohit8363
    @mohit8363 3 ปีที่แล้ว

    Problem is that it is not see clear down side because remove the English line word

  • @sahdevrai3368
    @sahdevrai3368 3 ปีที่แล้ว +1

    Can someone tell me why inside the "void minMax(....)" function, it is written that "*min=*max= arr[0]" why pointer is not initialized by giving address like "*min=*max= arr". I mean that arr will give address but arr[0] will give value.

    • @jxlim4613
      @jxlim4613 3 ปีที่แล้ว +5

      From what I understood, the two integer pointers 'int *min' and 'int *max', are already initialized by calling the function minMax(a, len, &min, &max). Notice that '&min' and '&max' are used here, so that 'int *min' and 'int *max' will be pointing to the address of min and max. This method is also named "pass by reference".

  • @mohammadmohsinmohammedmohs9717
    @mohammadmohsinmohammedmohs9717 4 ปีที่แล้ว

    sir in functions you have made a mistake
    you have declared arr[0] which is not even defined

  • @llvrsyr
    @llvrsyr ปีที่แล้ว

    why i didnt get the right value after try to run it

  • @debakantapradhan3616
    @debakantapradhan3616 2 ปีที่แล้ว

    For This concept i watached at least 10 video, still some misconcept was there in my mind. This video heped me to erase them all.

  • @himanshuhsr5102
    @himanshuhsr5102 3 ปีที่แล้ว

    Len =sizeof(a)/sizeof(a[0]) ye kya hua hai

    • @ChirantanSadhu
      @ChirantanSadhu 3 ปีที่แล้ว

      Index/number of elements calculate krne keliye.

  • @detector_aryan
    @detector_aryan 3 ปีที่แล้ว

    I can understand the code but can't understand the logic
    What should i do
    Should i learn algorithms ?
    What algorithm is applied in this program?

    • @beypazariofficial
      @beypazariofficial 3 ปีที่แล้ว +1

      try to make some code by yourself. try to understand how it works. it's also an algorithm so you don't have to study algorithm, you are already doing an algorithm

    • @detector_aryan
      @detector_aryan 3 ปีที่แล้ว

      @@beypazariofficial ok thanks

  • @AakashYadav-ch9un
    @AakashYadav-ch9un 3 ปีที่แล้ว

    I don't understand the use of pointer I mean why u cant u just simply change the value of the variable without declaring it outside the function just initialise it without mentioning the data type u just need to declare those variable globally

  • @satyamwalekar6862
    @satyamwalekar6862 4 ปีที่แล้ว

    It will show segmentation fault

  • @fairyshortsworld2431
    @fairyshortsworld2431 4 ปีที่แล้ว

    *p = 5

  • @anilreddy6777
    @anilreddy6777 5 ปีที่แล้ว +1

    Ee videos chusthe c motham vasthadha?

  • @pranjulgupta9355
    @pranjulgupta9355 3 ปีที่แล้ว

    5

  • @beypazariofficial
    @beypazariofficial 3 ปีที่แล้ว

    now i can hack planes

  • @srikanthbhogi5021
    @srikanthbhogi5021 4 ปีที่แล้ว

    Can anyone explain why this throws an Error!
    #include
    void minmax(int,int,int,int);
    int main()
    {
    int a[]={15,65,98,78,2,1,55,34};
    int max,min,lenght;
    lenght= sizeof(a)/sizeof(a[0]);
    minmax(lenght,&min,&max,a);
    printf("%d\t%d",min,max);
    }
    void minmax(int len,int *min,int *max,int arr[])
    {
    int i;
    *min=*max=arr[0];
    for(i=1;i *max)
    *max=arr[i];
    }
    }

  • @vaibhavgopalsharma5624
    @vaibhavgopalsharma5624 3 ปีที่แล้ว

    Sir vo arey nhi array hai XD

  • @allesklar7267
    @allesklar7267 3 ปีที่แล้ว +3

    your code does not work!!!

  • @andistheinforitbutso7513
    @andistheinforitbutso7513 2 ปีที่แล้ว

    Noice great

  • @floccinaucinihilipilificat6749
    @floccinaucinihilipilificat6749 2 ปีที่แล้ว

    OOOOOOOOOHHHHHHHHHHHHHHHHHHHHHHHHH

  • @naveenchandra960
    @naveenchandra960 4 ปีที่แล้ว

    kuch bhi samaj me nahi aaya

  • @ElyasSayle
    @ElyasSayle ปีที่แล้ว

    idk why the application example here is something that can be done without pointers? that doesn't really help me understand the need for pointers if I can use a simple for loop to do this.