I read a sample code from a development kits. The global array is declared without indicating the array size. I wonder is it safe?
Here is the code:
#include <stdio.h> // For Used Function printf
// UART Buffer
char uart0_buf[]; // "sprint" UART[0] Buffer
char uart2_buf[]; // "sprint" UART[2] Buffer
char uart3_buf[]; // "sprint" UART[3] Buffer
int main()
{
// UART[0] Print String //
sprintf(uart0_buf,"Testing1234 - Uart 0\n\r"); // Print Message String
// UART[2] Print String //
sprintf(uart2_buf,"Testing1234 - Uart 2\n\r"); // Print Message String
// UART[3] Print String //
sprintf(uart3_buf,"Testing1234 - Uart 3\n\r"); // Print Message String
}