C Program To Search A Number And Count Its Occurrence In An Array

Поділитися
Вставка
  • Опубліковано 23 січ 2025

КОМЕНТАРІ • 20

  • @naboulsikhalid7763
    @naboulsikhalid7763 Рік тому +2

    you made it so easy to understand, that a quality. Thank you

  • @nischay9385
    @nischay9385 Рік тому +2

    Thanks man it really helped me bro❤

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

    Great Job! Easy to understand though!

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

    I tried this code but the statement prints several times... why?

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

    bro pls make a video on (array of pointer to string) concept
    its very confusing

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

      Sure will cover it while teaching "Strings". Meanwhile you can watch this video technotip.com/9116/c-programming-arrays-pointers-functions/ and learn how arrays and pointers work. Please don't forget to subscribe to our UA-cam channel and blog. 👍

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

    I don't understand why you used the scanf of the interger key underneath that printf

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

      Without scanf how can you give the input

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

    Thanks!

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

    Why i +1 in printf

    • @Sanju-gp4ch
      @Sanju-gp4ch 2 роки тому +2

      Because he want to find the position of the number he searched in the array.
      It can be written as just i only but as we don't start our count from zero so he increased i by one to know the position.

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

    Write a program to reverse the strings stored in the following array of pointers to strings:
    char *s[ ] = {
    "To err is human...",
    "But to really mess things up...",
    "One needs to know C!!"
    } ;
    pls make a video on explaining this problem pls pls

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

      Will surely take this up when teaching about "Strings" bro. Kindly stay subscribed to our UA-cam channel and blog. 👍

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

    please explain this
    //=========C program to print the all index of an element in an array===========
    int AllIndexesRecursive (int input[], int size, int x, int output[])
    {
    if (size == 0)
    return 0;
    int smallAns = AllIndexesRecursive (input + 1, size - 1, x, output);
    if (input[0] == x)
    {
    for (int i = smallAns - 1; i >= 0; i--)
    output[i + 1] = output[i] + 1;
    output[0] = 0;
    smallAns++;
    }
    else
    for (int i = smallAns - 1; i >= 0; i--)
    output[i] = output[i] + 1;
    return smallAns;
    }
    void aio (int a[], int size, int x)
    {
    int res[size];
    int n = AllIndexesRecursive (a, size, x, res);
    for (int i = 0; i < n; i++)
    {
    printf ("%d ", res[i]);
    }
    }
    void main ()
    {
    int a[5] = { 1, 2, 1, 1, 1 };
    aio (a, 5, 1);
    return;
    }

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

    Good but video is not clear enough

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

    why is the final result not working for me?
    for(i=0; i

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

      Count should be used in if statement not in else statement

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

    nice