#include <stdio.h> #include <stdlib.h> int main() { int* ptr; int* ptr1; int n; int i;int sum = 0; n = 5; printf("Number of elements: %d", n); ptr = (int*)malloc(n * sizeof(int)); ptr1 = (int*)calloc(n, sizeof(int)); if (ptr == NULL || ptr1 == NULL) { printf("\nMemory not allocated."); } else { printf("\n\nMemory successfully allocated using malloc."); for (i = 0; i < n; ++i) { ...
I write about machine learning models, python programming, web scraping, statistical tests and other coding or data science related things I find interesting. Read, learn and grow with me!