Some bitchass piece of paper: "What's your gender?"
Me, a gay cat on the internet: Segmentation Fault (core dumped)
seen from Denmark
seen from United Kingdom

seen from Denmark
seen from China
seen from Malaysia
seen from India
seen from China
seen from United Kingdom

seen from Malaysia

seen from United Kingdom
seen from Germany

seen from United Kingdom
seen from United Kingdom

seen from United Kingdom
seen from Australia
seen from Singapore
seen from United States
seen from United Arab Emirates
seen from Malaysia
seen from China
Some bitchass piece of paper: "What's your gender?"
Me, a gay cat on the internet: Segmentation Fault (core dumped)
Dynamic Memory Allocation in C
Dynamic Memory Allocation in C
C is a language with some fixed rules of programming. For example: changing the size of an array is not allowed. Dynamic Memory Allocation: Dynamic memory allocation is a way to allocate memory to a data structure during the runtime we can use DMA function available in C to allocate and free memory during runtime. Function for DMA in C Following functions are available in C to perform dynamic…
View On WordPress
C++ Dynamic Memory Allocation helps to allocate memory. Learn how new and delete operators work in C++ with syntax & example, explore about memory leak & dangling pointer
The Xinu Page
from Sasta Sauda https://ift.tt/2IFtnmL via
View On WordPress
Dynamic Memory Allocation
Dynamic Memory Allocation:-
Every program allocates memory during the runtime and load time, but how much memory will be allocated during the runtime is called dynamic memory allocation.
If the size is decided during the compile time only that called static memory allocation.
Entire 4GB memory is split into two parts such as lower 3GB memory is called as user space and upper 1GB memory is called…
View On WordPress
New Post has been published on Learning Hub
New Post has been published on http://ictjobs.info/program-find-sum-array-dynamic-memory-allocation/
C program to find the sum of array using Dynamic Memory Allocation
/* Write a C program to find the sum of two one-dimensional arrays using Dynamic Memory Allocation */
#include <stdio.h> #include <alloc.h> #include <stdlib.h> void main() { int i,n; int *a,*b,*c; printf("How many Elements in each array...\n"); scanf("%d", &n); a = (int *) malloc(n*sizeof(int)); b = (int *) malloc(n*sizeof(int)); c =( int *) malloc(n*sizeof(int)); printf("Enter Elements of First List\n"); for(i=0;i<n;i++) { scanf("%d",a+i); } printf("Enter Elements of Second List\n"); for(i=0;i<n;i++) { scanf("%d",b+i); } for(i=0;i<n;i++) { *(c+i) = *(a+i) + *(b+i); } printf("Resultant List is\n"); for(i=0;i<n;i++) { printf("%d\n",*(c+i)); } }
Output
How many Elements in each array... 4 Enter Elements of First List 1 2 3 4 Enter Elements of Second List 6 7 8 9 Resultant List is 7 9 11 13