I have this code in C which takes in bunch of char
s
#include
# define NEWLINE \'\\n\'
int main()
{
char c;
char str[6];
int i =
C does not check array bounds.
In fact, a segmentation fault isn't specifically a runtime error generated by exceeding the array bounds. Rather, it is a result of memory protection that is provided by the operating system. It occurs when your process tries to access memory that does not belong to it, or if it tries to access a memory address that doesn't exist.