Why my code print out more characters than its limit?
Here's my code: #include <stdio.h> /// The #include directive will call the header file called stdio.h. This Library have some standard input and output functions. int main() ///Entry point to the program. { char a[15]; ///An array that contains a space of 15 characters named a. printf("Enter a string\n"); ///Ask the user to enter some string (a sequence of letters). gets(a); ///A function used to gets a string from the user. Store that information in the 'a' array. printf("You just typed: "); puts(a); /// print out the letters of the 'a' array. return 0; ///End of program. } Note: I'm a beginner, so I might write something wrong... The char a[15] can hold 15 characters, but when I typed more than 15 characters, it still prints out.