logo

Crowdly

What will be the output of the following code? #include <stdio.h> #include <...

✅ The verified answer to this question is available below. Our community-reviewed solutions help you understand the material better.

What will be the output of the following code?

#include <stdio.h>

#include <stdlib.h>

int main() {

    int *arr = (int *)malloc(5 * sizeof(int));

    for (int i = 0; i < 5; i++) {

        *(arr + i) = i * 2;

    }

    printf("%d\n", arr[3]);

    free(arr);

    return 0;

}

More questions like this

Want instant access to all verified answers on lms.musteducation.tn?

Get Unlimited Answers To Exam Questions - Install Crowdly Extension Now!