i have the following code
Code:
#include <stdio.h>
#include <stdlib.h>

int main()
{
    char buff[1001];

    fgets(buff, sizeof(buff), stdin);
    printf("\n999th character is %c and the 1000th chacter is %c\n the whole thing = %s\n", buff[999], buff[1000], buff);
    return 0;
}
but when i paste in the string of 1000 numbers it just quits doesn't do anything ie the printf doesn't run if i force it to pause with a break point and step past the printf i get the wrong result buff[999] is a space and 1000 is 0

is this doing somthing wierd like trying to convert the integer to a ascii code