Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- #include <string.h>
- int main () {
- char** stringhe = (char**)malloc(sizeof(char*) * 10);
- for(int i = 0; i < 10; i++) {
- stringhe[i] = (char*) malloc(sizeof(char) * 5);
- memset(stringhe[i], 'a' + i, 5);
- stringhe[i][4] = '\0';
- }
- for(int i = 0; i < 10; i++) {
- printf("%s\n", stringhe[i]);
- }
- // int* dati = (int*)malloc(sizeof(int) * 1000);
- // memset(dati, 0, 1000);
- // // 00000011 00000011 00000011 00000011
- // for(int i = 0; i < 1000; i++) {
- // printf("%d ", dati[i]);
- // }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement