所以我在整數讀入一個數組,我如何用空格填充空元素。我知道他們得到了這個長負數的初始化。我檢查他們是否有這些,然後用空格填充這些元素?如何用空格填充未初始化的數組元素? c
int* scores = malloc(51 * sizeof(int));
FILE* fp;
char* string = malloc(21 * sizeof(char));
int length;
int* plength = &length;
int number_of_conversions;
long offset = 0;
long* poffset = &offset;
int* scores = malloc(51 * sizeof(int));
scores[50] = '\0';
int total;
int* ptotal = &total;
int i = 0;
這是陣列
array is this int * scores = malloc(51 * sizeof(int)); –
假設用「空格」表示「'」字符:用這種方式填充「int」會導致帶有'538'976'288'(又名'0x20202020')的'int',假設它是一個32位'int'。確定你想要這個? – alk