hello, I'm trying to learn about strings and I wrote this simple piece of code to try and print out: ABCD
but it prints out some weird characters after D
it puts out: ABCD "
and some other symbol not on my keyboard, does anyone know why?
thank you
here's the code I wrote:
Code:#include <stdio.h> #include <stdlib.h> #include <string.h> main() { char string1 [] = { 'A' , 'B' , 'C' , 'D' } ; printf("%s",string1); getchar(); }