When I compile the following code and run it the code runs
#include<stdio.h>
#include<string.h>
#include<stdlib.h>
int main(){
    char* array[1];
    scanf("%s",array[0]);
    return 0;
}
but the following code doesn't run. It shows segmentation fault. Whats the reason.
#include<stdio.h>
#include<string.h>
#include<stdlib.h>
int main(){
    char* array[2];
    scanf("%s",array[0]);
    scanf("%s",array[1]);
    return 0;
}
My input is bond in 1st case and James Bond in 2nd
 
    