I'm having a non-boot error, and I can not figure out why:
#include <stdio.h>
int main(){
const int LENGTH = 10;
const int WIDTH = 5;
const char NEWLINE = "\n";
int area;
area = LENGHT * WIDTH;
printf("Value of area : %d", area);
printf("%c", NEWLINE);
return 0;
}
Errors:
C:\Users\zegla\OneDrive\Ambiente de Trabalho\Cexs\trainning6_const.c: In function 'main': C:\Users\zegla\OneDrive\Ambiente de Trabalho\Cexs\trainning6_const.c:6:24: warning: initialization makes integer from pointer without a cast [-Wint-conversion] const char NEWLINE = "\n"; ^ C:\Users\zegla\OneDrive\Ambiente de Trabalho\Cexs\trainning6_const.c:9:10: error: 'LENGHT' undeclared (first use in this function) area = LENGHT * WIDTH; ^ C:\Users\zegla\OneDrive\Ambiente de Trabalho\Cexs\trainning6_const.c:9:10: note: each undeclared identifier is reported only once for each function it appears in