predstavitev seminarja

This commit is contained in:
Jaka Furlan 2026-01-11 21:29:07 +01:00
parent a82fd0ab4e
commit f7a1d65649
7 changed files with 49 additions and 0 deletions

17
seminar/malloc_0_size.c Normal file
View file

@ -0,0 +1,17 @@
#include <stdlib.h>
#include <stdio.h>
int main(){
int *ptr = malloc(0);
if(ptr == NULL){
printf("Vrednost ptr je NULL\n");
return 0;
}
printf("Vrednost ptr je %d\n", ptr);
int skrivnostnaVrednost = *ptr;
printf("SkrivnostnaVrednost na katero kaže prt je %d\n", skrivnostnaVrednost);
free(ptr);
return 0;
}