eg0rmaffin

testing malloc ft

Jul 13th, 2019
196
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.27 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3.  
  4. int main()
  5. {
  6.     int byte;
  7.     printf("How many memory do u want?  ");
  8.     scanf("%d", &byte);
  9.     char *array = (char*)malloc(byte);
  10.     if (array == NULL){
  11.         printf("fuc u");
  12.     } else
  13.     printf("its ok bro");
  14. }
Advertisement
Add Comment
Please, Sign In to add comment