#24 C Pointers and Arrays | C Programming For Beginners

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

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

  • @programizstudios
    @programizstudios  2 года назад +6

    🔥Finding it Damn Hard to Understand C Programming?
    Learn to code-the right way-with interactive lessons, quizzes & challenges. Build a strong programming base; it's IMPORTANT!
    Try Programiz PRO for Free: bit.ly/master-c-programming

  • @jessicabuehne920
    @jessicabuehne920 2 года назад +32

    I love studying with programiz, it's explained so simply :) I'm currently studying for my programming exam that's coming up, so thank you for the free lessons!

  • @stealthy_doctor
    @stealthy_doctor 3 месяца назад +1

    Wonderful video! i think for the quiz it is D. &ages[0] because its like what was said where if you use just the name of the array it points to the head by deafult
    #include
    int main() {
    // Write C code here
    int arr[5] = {34,12,21,54,48};
    int largest = *arr;
    for(int i = 0; i

  • @sunnypreetham2933
    @sunnypreetham2933 2 года назад +4

    Plz try to upload the videos faster can't wait to learn any way ur teaching skills are mind blowing

  • @akshaybagalkotkar7833
    @akshaybagalkotkar7833 2 года назад +5

    #include
    int main()
    {
    int arr[5] = {34,12,21,54,48};
    int largest = *arr;
    int i=0;
    for(i=0; i

  • @BelalAlobieda
    @BelalAlobieda 2 года назад +4

    I don't understand how you make it so easy like this. Thanks a lot

  • @NyangwaKulwa
    @NyangwaKulwa 11 месяцев назад +2

    Superb! I've liked the explanations for they are well understood.Thanks for making the c programmming knowledge accessible to everyone in need of it.

  • @rodolfoc.nascimento6301
    @rodolfoc.nascimento6301 2 года назад +2

    Amazing, the way you teach is incrible! I got pointers now, I admiti I had some dificult, thank you!

  • @sushilgbp
    @sushilgbp Год назад +21

    Quz answer is option D.
    #include
    int main()
    {
    int arr[5] = {5,10,15,20};

    int largest = *arr;

    int i=0;

    for(i=0; i

    • @18fatima15
      @18fatima15 8 месяцев назад +3

      wouldn't it be better to start iterating the for loop from i=1

    • @Paroseni.
      @Paroseni. 6 месяцев назад +3

      No because then you miss the first array element, as arrays start from value 0

    • @WOLF_XXX0
      @WOLF_XXX0 Месяц назад

      @@Paroseni. but the first element of that array is already assigned as the largest.

  • @AIVerse3.0
    @AIVerse3.0 2 года назад +2

    You are making good videos. I am thankful to you for this help. This is avery easy way to learn C language from very beginning.

  • @SaiSiddartha-l9o
    @SaiSiddartha-l9o 3 месяца назад

    Answer is option D mam because the array name represents the address of the first element of the array

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

    mam i request you upload the series on daily basis....

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

    Thanks for your clear explanations :)

  • @jonathanmawuena9081
    @jonathanmawuena9081 5 месяцев назад

    🎉❤❤❤i love the experience here. Keep it up ma'am

  • @rodolfoc.nascimento6301
    @rodolfoc.nascimento6301 2 года назад

    Never thougth I would finally use pointers and make the challenge in this video

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

    best tutorial for freshers >> beginners

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

    Can't wait, so curious about ur next series

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

    thank u mam

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

    amazing teacher😍😍

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

    thank you so much ❤❤❤❤🧡🧡🧡🧡💚💚💚💚

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

    Thank you

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

    thanks

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

    nice explanation

  • @programizstudios
    @programizstudios  2 года назад +4

    Q. In an array, int ages[5], what does ages represent?
    A. ages[4]
    B. ages[0]
    C. &ages[4]
    D. &ages[0]

    • @AIVerse3.0
      @AIVerse3.0 2 года назад

      I have to watch video first.

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

      ages[0]

    • @rickzalman4136
      @rickzalman4136 2 года назад +6

      ages is the base address of the array called ages. The name ages without a subscript always means &ages[0] or ages + 0 .
      It is the starting address of the array in memory, the address of the first element of the array.

    • @anonymouszn4978
      @anonymouszn4978 2 года назад +5

      Option D

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

      B. ages[0]

  • @elizabethbabykuriakose7499
    @elizabethbabykuriakose7499 7 месяцев назад

    good video

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

    #include
    int main() {
    int arr[5] = {34,12,21,54,48};
    int largest = *arr;
    for(int i=0;i

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

    as we are using the %p format specifier we are getting the hexadecimal value if we are using the %d format specifier it is giving different value i am just confused that which is the suitable format specifier for finding the address.

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

      Use %u format spacifier for integer type memory address.

    • @tibish
      @tibish 3 месяца назад

      %p is what you are looking for. the hexadecimal value is the acctual memory address where the value is stored.

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

    good good!

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

    printf("Array Address: %p
    ", numbers);
    Why are we not using &numbers in this line of code?
    isnt 'numbers' supposed to show the value and '&numbers' supposed to show the address?

    • @fanman2101
      @fanman2101 11 месяцев назад +1

      numbers with brackets mean "the value of an element", numbers without brackets means "address of the first element"

    • @aswinmanoj8681
      @aswinmanoj8681 11 месяцев назад

      @@fanman2101 thank you

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

  • @techMohh
    @techMohh Год назад +2

    who has the link to the github

  • @Selcuk._._
    @Selcuk._._ 5 месяцев назад

    /*
    Create a program to find the largest element of an array using pointers.
    int arr[] = {34, 12, 21, 54, 48);
    • Assign the first element of the array to a largest variable using pointer
    int largest = *arr
    • Run a for loop to access each element of the array.
    • Compare largest with each array element using pointer
    largest < *(arr + i)
    • If the largest variable is smaller than a element, assign the array value to largest
    largest = *(arr + i)
    */
    printf("

    -- Programming Task --

    ");
    int arr[] = { 34, 12, 21, 54, 48 };
    int largest = *arr;
    for (int i = 0; i < 5; i++) {
    if (largest < *(arr + i))
    largest = *(arr + i);
    }
    printf("Largest element is %d", largest);
    Answer is D...

  • @laurenzwegler7141
    @laurenzwegler7141 Месяц назад

    //->find largest number in an array
    //->print it
    #include
    int main()
    {
    int arr[] = {0, 20, 31, 95, 10, 22, 70, 11};
    int largestNum = *arr;
    for(int i = 0; i < sizeof(arr)/sizeof(*arr); i++)
    {
    if(largestNum < *(arr+i))
    largestNum = *(arr+i);
    }
    printf("Largest Number: %d", largestNum);
    return 0;
    }

  • @rodolfoc.nascimento6301
    @rodolfoc.nascimento6301 2 года назад

    the platform could put OpenGl Course I would Apreciate also, bye

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

    💪🏼

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

    Could anyone tell the difference between
    char*array[] = {"hi","hello","bye"}
    char ARRAY[] = {"hi","hello","bye"}
    ?

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

      Second one is wrong, because you need a 2D array whereas you're only declaring a single-dimensional array in the second array

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

      Well the first one is an array of pointers and the second one is a pointer constant pointing to the starting address of that array.
      For example
      char* arr[]= {
      "Ann",
      "Ben",
      "Dana",
      "Elle"
      };
      you have a array of 4 pointers pointing to the starting address of each string.
      The second one ,
      char arr[]={"Anna", "Bob","Dana", "Jim};
      Is a array , but you can use the array name as a pointer to the starting address of the array.
      arr points to the address of first element of the array called arr.
      It is the same as &arr[0] or arr +0.
      arr+ 1 is the same as &arr[1] , which
      points to address of element called "Bob" , arr + 2 same as &arr[2] , which points to the address of element callrd "Dana" and so on through the array.

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

      //char*array[] = {"hi","hello","bye"}
      //for the first one by using this we can get the output
      #include
      int main() {
      // Write C code here
      char* array[] = {"hi", "hello", "bye"};
      for(int i=0; i < 3;++i){
      printf("%s
      ", *(array+i));
      }
      return 0;
      }
      //but the second one is a two-dimensional array so you have to use like this
      #include
      int main() {
      // Write C code here
      char ARRAY[][20] = {"hi", "hello", "bye"};
      for (int i = 0; i < sizeof(ARRAY) / sizeof(ARRAY[0]); ++i) {
      printf("%s
      ", ARRAY[i]);
      }
      return 0;
      }

  • @sandeepvarma8453
    @sandeepvarma8453 5 месяцев назад

    d.&ages[0]

  • @daireosullivan1193
    @daireosullivan1193 5 месяцев назад

    #include
    #include
    #include
    #include
    #include
    int main() {
    int arr[] = {34, 12, 21, 54, 48};
    int largest = *arr;
    for(int i = 0; i < 5; i++) {
    if (largest < *(arr + i)) {
    largest = *(arr + i);
    }
    }
    printf("%d", largest);
    return 0;
    }

  • @dnwint2
    @dnwint2 4 месяца назад

    D

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

    Quiz answer is B. ages[0]

  • @shivamray6689
    @shivamray6689 7 месяцев назад

    #include
    int main() {
    int arr[] = {34, 12, 21, 54, 48};
    int largest = *arr; // largest = arr[0]
    for (int i = 0; i < 5; ++i) {
    if (largest < *(arr + i)) {
    largest = *(arr + i);
    }
    }
    printf("The Largest value of an Array is: %d", largest);
    return 0;
    }

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

    0 = gyro

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

    The answer is D.

  • @shubhamsingh-bi7np
    @shubhamsingh-bi7np 2 года назад

    d

  • @YUPENGMA-h1y
    @YUPENGMA-h1y Год назад

    #include
    int main(){
    int arr[] = {34,12,21,54,48};
    int largest = *arr;
    for(int i = 0; i < 5; ++i){
    if (largest < *(arr + i)){
    largest = *(arr + i);
    }
    }
    printf("The largest number of array is : %d", largest);

    return 0;
    }

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

    for memory addresses, I am supposed to get 0x(some set of numbers and upper/lowercase letters), but when I run the code at 1:53, I am just getting numbers and a repeated set of uppercase letters
    Ex:
    1 = 000000452BEFF938
    3 = 000000452BEFF93C
    5 = 000000452BEFF940
    7 = 000000452BEFF944
    9 = 000000452BEFF948
    does anyone know why this is?

    • @adwaithanil3747
      @adwaithanil3747 8 месяцев назад

      well that was her system basically a cloud system and this is your system both will have a different memory location If I do it I will get some other output anyway be happy that you got hexadecimal values

    • @lulztigre
      @lulztigre 8 месяцев назад

      What platform are you running on

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

    Quiz 'D'
    #include
    #include
    int main(){
    int arr[] = {34,12,21,54,48};
    int largest = *arr;
    for(int i = 0; i < 5; i++){
    if (largest < *(arr+i)){
    largest = *(arr+i);
    }
    }
    printf("Largest number is %d",largest);
    return 0;
    }

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

    int numbers[5] = {34, 12, 21, 54, 48};
    int* largestPointer = numbers;
    for(int i = 0; i < 5; i++) {
    int* currentPtr = numbers + i;
    if(*currentPtr > *largestPointer) {
    largestPointer = currentPtr;
    }
    }
    printf("%d", *largestPointer);
    is that a solution

  • @fountain9886
    @fountain9886 8 месяцев назад +4

    wash your hair pleaseeeeee.

    • @lulztigre
      @lulztigre 8 месяцев назад

      😂😂dfkm

    • @the_night_traveler
      @the_night_traveler 5 месяцев назад

      What's wrong with her hair? Stop being racist! If you didn't like it, don't freaking watch her videos, that's it...

    • @0xaexon
      @0xaexon 4 месяца назад +2

      Bruh?

    • @the_night_traveler
      @the_night_traveler 4 месяца назад +8

      Nothings wrong with her hair, you wash your eyes :D

    • @senor_17
      @senor_17 Месяц назад

      Wash your eyes with acid

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

    #include
    int main()
    {
    int arr[5] = {34,12,21,54,48};
    int* ptr , largest ;
    ptr = &arr[0];
    largest = *ptr;
    for (int i = 0 ; i < 5 ; ++i){
    if (*(ptr + i) > largest){
    largest = *(ptr + i);
    }
    }
    printf("The largest value is %d", largest);

    return 0;
    }

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

    Programiz Task
    #include
    int main(void)
    {
    int numbers[5] = {34, 12, 21, 54, 48};
    int largest = *numbers;
    for(int i = 0; i < 5; i++)
    {
    if(*(numbers + i) > largest)
    {
    largest = *(numbers + i);
    }
    }
    printf("Largest Element: %d", *(&largest)); //lol
    return (0);
    }

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

    #include
    int main() {
    int arr[5] = {34, 12, 21, 54, 48};
    int i;
    int largest = *arr;
    for (i = 0; i < 5; i++)
    if (largest < *arr + i)
    largest = *(arr + i);
    printf("the largest variable is %d
    ", largest);
    return 0;
    }

  • @JeongWoonKim-i4j
    @JeongWoonKim-i4j Год назад

    #include
    int main() {
    int arr[5] = {34, 12, 21, 54, 48};
    int largest = *arr;
    for(int i; i < 5; i++) {
    if(largest < *(arr + i)) {
    largest = *(arr + i);
    }
    else {
    printf("%d
    ", *(arr + i));
    }
    }
    printf("Largest number is %d", largest);
    return 0;
    }

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

    #include
    int main() {
    int arr[] = { 34 , 12 , 21 , 54 , 48,};
    printf(" Find the largest value of this array {34 , 12 , 21 , 54 , 48} :
    ");
    int largest = *arr;
    for(int i=0 ; i < 5 ; ++i)
    {
    if ( largest < *(arr + i)){
    largest = *(arr+i);
    }
    }
    printf("The largest value is : %d" , largest);
    return 0;
    }

  • @hristijanp.8500
    @hristijanp.8500 Год назад

    #include
    int main() {
    int arr[]={34,12,21,54,48};
    int largest = *arr;
    for(int i=0;i

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

    #include
    int main()
    {
    int i;
    int ary[5] = {34, 12, 21, 54, 48};
    int largest = *ary;
    for(int i = 0; i < 5;i++){
    printf("%d
    ", ary[i]);
    if(largest < *(ary + i)){
    largest = *(ary + i);
    }
    }
    printf("the largest value is %d
    ", largest);
    return 0;
    }

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

    #include
    int main() {
    int i,size;
    printf("Enter the size of array : ");
    scanf("%d", &size);
    int array[size];
    printf("Input Any %d elements :- ",size);
    for (i = 0; i < size; i++ )
    { printf ("
    array[%d] = ", i);
    scanf (" %d", &array[i]);
    }
    int largest = *array;
    for (int i = 0; i < 5; ++i) {
    if (largest < *(array + i)) {
    largest = *(array + i);
    }
    }
    printf("Largest element of array is %d", largest);
    return 0;
    }

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

    I did the quiz like this XD:
    if(arr[0]>arr[1])
    {
    largest=arr[0];
    if(arr[0]>arr[2])
    {
    if(arr[0]>arr[3])
    {
    if(arr[0]>arr[4])
    {
    printf("Array 0 is the largest!");
    }
    }
    }
    }

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

    #include
    /* Create a program to find the largest element of Array
    using pointer */
    int main()
    {
    int arr[5] = {2, 4, 23, 5, 7};
    int large_element = *arr;
    for (int i = 0; i < 5; i++)
    {
    if (*(arr + i) > large_element)
    {
    large_element = *(arr + i);
    }
    else
    {
    continue;
    }
    }
    printf("

    largerst element of array: %d", large_element);
    return 0;
    }

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

    #include
    int main() {
    int arr[5] = { 34, 12, 21, 54, 48 };
    for (int i = 0; i < 5; i++) {

    if (*arr < *(arr + i)) {

    *arr = *(arr + i);
    }
    }
    printf("%d", *arr);


    return 0;
    }

  • @TheHeraldOfSpring
    @TheHeraldOfSpring Месяц назад

    #include
    int main(){
    int arr[] = {34, 12, 21, 54, 48};
    int largest = *arr;
    for(int i = 0; i < 5; i ++){
    printf("%d vs %d
    ", largest, *(arr + i));
    if(largest < *(arr + i)){
    largest = *(arr + i);
    printf("New largest is %d
    ", largest);
    }
    }
    printf("THE WINNER IS %d", largest);
    return 0;
    }

  • @madinaabduganiyeva9249
    @madinaabduganiyeva9249 8 месяцев назад

    #include
    void* findProduct (int* num1, int* num2, int* productOF);
    int main () {
    int number1 = 9;
    int number2 = 13;
    int products;
    int* result = findProduct(&number1, &number2, &products);
    printf("The product is %d", *result);
    return 0;
    }
    void* findProduct (int* num1, int* num2, int* productOF){
    int product = *num1 * *num2;
    *productOF = product;
    return productOF;
    }

  • @callumapps5873
    @callumapps5873 Месяц назад

    #include
    int main() {
    int arr[] = {34, 12, 21, 54, 48};
    int largest = *arr;
    for(int i = 0; i < 5; i++) {
    printf("%d
    ", *(arr + i));
    if (largest < *(arr + i)) {
    largest = *(arr + i);
    }
    }
    printf ("largest : %d
    ", largest);
    return 0;
    }

  • @shijothomas4108
    @shijothomas4108 2 года назад +12

    ages represent the memory address of the zeroth array element. ie, ages+0 equals &ages[0]. Option D is the correct answer

  • @madinaabduganiyeva9249
    @madinaabduganiyeva9249 9 месяцев назад +1

    #include
    int main (){
    int arr[] = {32, 12, 21, 54, 48};
    int largest = *arr;
    for(int i = 0; i < 5; i++){
    if(largest < *(arr+i)){
    largest = *(arr + i);
    }
    }
    printf("Largest element of array is %i.
    ", largest);
    return 0;
    }

  • @emmanueljulius1827
    @emmanueljulius1827 2 года назад +4

    Ages represent the first element in the array, which is ages[0]

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

    Option D : &ages[0]
    -------------------------------------------------------------------
    #include
    int main()
    {
    int arr[5] = {34, 12, 21, 54, 48};
    int largest = *arr;
    int i;
    for(i=0; i

  • @light-warrior
    @light-warrior 7 месяцев назад +1

    Task:
    #include
    int main() {
    int arr[5] = {34, 12, 21, 54, 48};
    printf("First element in the array before change: %d
    ", arr[0]);
    int largest = *arr;
    *arr = 65;
    printf("Fist element in the array after the change: %d
    ", *arr);
    for(int i = 0; i < 5; i++) {
    if (largest < *(arr + i) ) {
    largest = *(arr + i);
    }
    }
    printf("Largest number of the array: %d
    ", largest);
    return 0;
    }
    Quiz answer: ages[0] represents the first element of the array, ages[1] represents the second element, and so forth, up to ages[4], which represents the fifth (and last) element of the array.

  • @zindycangaming9851
    @zindycangaming9851 11 часов назад

    4:10 "Ith element" 💀

  • @violetv1964
    @violetv1964 8 месяцев назад +1

    U just saved this semester

  • @endeavored
    @endeavored Год назад +3

    Answer =
    /*
    Program to find largest elemnt of an array using pointers.
    Instructions:
    Assign first element of array to a largest variable using pointer,
    int largest = *arr;
    run a loop to read each element of the array, compare largest with each array element using pointer.
    largest < *(arr + i);
    if largest variable < element assign the array value to largest variable.
    largest = *(arr + i);
    */
    #include
    int main()
    {
    int arr[5] = {34, 12, 21, 54, 48};
    int i;
    int largest = *arr;
    for(i = 0; i < 5; i++)
    {
    if(largest < *(arr + i))
    {
    largest = *(arr + i);
    }
    }
    printf("Largest value in array = %d", largest);
    return 0;
    }

  • @Ayman-bu1rz
    @Ayman-bu1rz 4 месяца назад

    awl hindiya zwina

  • @umar8980
    @umar8980 2 месяца назад

    Alloh rozi bolsin

  • @angelffg
    @angelffg Месяц назад

    Great!

  • @countrysideshowyaigrock4689
    @countrysideshowyaigrock4689 Год назад +14

    #include
    int main() {
    int array[5] = {34, 12, 21, 54, 48};
    int largest = *array;
    for (int i = 0; i < 5; ++i) {
    if (largest < *(array + i)) {
    largest = *(array + i);
    }
    else {
    printf("%d
    ", *(array + i));
    }
    }
    printf("Largest element of array is %d", largest);
    return 0;
    }

  • @phoneix24886
    @phoneix24886 8 месяцев назад

    When I was in college no internet resources were available. To search something simple as function pointers or array pointers we had to read books from Library. It was a tedious process.
    A college project could have taken months to complete.
    I love how modern education has evolved and become so interesting and simple.

  • @hongkyulee9724
    @hongkyulee9724 Месяц назад

    Your video is really helpful to understand how a point arithmetic works and fundamentally what an array is

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

    This video is great,the last programming task makes it perfect.🛐

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

    Thanks

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

    D

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

    good job you guys

  • @abobakrabdoun9866
    @abobakrabdoun9866 4 месяца назад +1

    Free Palestine 🇵🇸🫀

  • @thelegendarysummersky3189
    @thelegendarysummersky3189 7 месяцев назад

    #include
    int main() {
    int arr[5] = {34,12,21,54,48};
    int largest = *arr;
    for(int i=0; i

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

    #include
    #include
    int stdsize = 20;
    int main() {

    int numbers[5];
    int sizeOfNum = sizeof(numbers)/sizeof(*numbers);
    for(int i = 0; i < sizeOfNum; i++){
    printf("
    Enter an integer value: ");
    scanf("%d", &numbers[i]);
    }
    printf("The values of the array 'numbers' is: ");
    for(int i = 0; i < sizeOfNum; i++){
    printf("%d ", numbers[i]);
    }
    int largest = *numbers;
    printf("
    The supposed largest value is: %d", largest);
    for(int i = 0; i < sizeOfNum; i++){
    if(largest < *(numbers+i)){
    largest = *(numbers+i);
    }
    }
    printf("
    The actual largest value is: %d", largest);
    return 0;
    }

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

    #include
    int main() {
    int numbers [6] = {23,45,37,54,81,63};
    int largest= *numbers;
    for(int i =0; i < 6; ++i) {
    if(largest < *(numbers+i)){
    largest = *(numbers+i);}
    }
    printf("largest element is %d", largest);
    return 0;
    }

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

    #include
    int main() {
    int arr[] = {34, 12, 21, 54, 48};
    int largest = *arr;
    for(int i=1; i