I'm trying to get a program to print out two strings that I input. I can't figure out why its not working!
#include <stdio.h>
#include <stdlib.h>
#define ARRAY_SIZE 30
int main() {
char s1[ARRAY_SIZE];
char s2 [ARRAY_SIZE];
printf("Enter a String:\n");
scanf("%25s\n", s1);
printf("Enter string 2:\n");
scanf("%25s\n", s2);
printf("String 1: %s\n", s1);
printf("String 2: %s\n", s2);
return(EXIT_SUCCESS);
}
It compiles, but then say if I enter as String 1: I do, and String 2: Will not, it will print out:
I
do
It is like nothing is going into the second string!
Any help is appreciated, thanks.