TEST C COURSE CHAPTER
main.c
123456789101112131415161718192021#include <stdio.h> #include <stdlib.h> #include <string.h> int main () { char *str; /* Initial memory allocation */ str = (char *) malloc(15); strcpy(str, "tutorialspoint"); printf("String = %s, Address = %u\n", str, str); /* Reallocating memory */ str = (char *) realloc(str, 25); strcat(str, ".com"); printf("String = %s, Address = %u\n", str, str); free(str); return(0); }
Was alles duidelijk?
Bedankt voor je feedback!
Sectie 1. Hoofdstuk 1
Vraag AI
Vraag AI
Vraag wat u wilt of probeer een van de voorgestelde vragen om onze chat te starten.
Awesome!
Completion rate improved to 100
TEST C COURSE CHAPTER
Veeg om het menu te tonen
main.c
123456789101112131415161718192021#include <stdio.h> #include <stdlib.h> #include <string.h> int main () { char *str; /* Initial memory allocation */ str = (char *) malloc(15); strcpy(str, "tutorialspoint"); printf("String = %s, Address = %u\n", str, str); /* Reallocating memory */ str = (char *) realloc(str, 25); strcat(str, ".com"); printf("String = %s, Address = %u\n", str, str); free(str); return(0); }
Was alles duidelijk?
Bedankt voor je feedback!
Sectie 1. Hoofdstuk 1