Mảng có thể tạo bằng mọi kiểu: int, char, float, double... Nhưng tạo mảng kiểu void không thể. Lỗi sẽ hiện nếu làm vậy.
Chương trình minh họa:
Ví dụ
#include <stdio.h>
#include <stdlib.h>
int main() {
void arr1[4];
printf("Một mảng void");
return 0;
}Kết quả
Chương trình trả về lỗi:
error: declaration of 'arr1' as array of voids void arr1[4];
Hiểu chương trình:
Mảng arr1 kiểu void được tạo. Vì không thể trong C, thông báo lỗi "declaration of 'arr1' as array of voids".