Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #define _CRT_SECURE_NO_WARNINGS
- #include <stdio.h>
- #include <stdlib.h>
- int main() {
- int nizStack[100] = { 1,2,3 };
- int n;
- printf("Unesite koliki niz zelite: ");
- scanf("%d", &n);
- // n = 8
- int* niz = malloc(n * sizeof(int)); // odvoji prostor nista spec ne radi
- int* nizC = calloc(25, sizeof(int)); // stavi im vrednosti 0
- niz[1] = 12;
- printf("%d", niz[1]);
- free(niz);
- free(nizC);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement