Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
23 Apr 2000 20 Apr 2025 10 Apr 2050 7 Apr 2075
15 Apr 2001 5 Apr 2026 2 Apr 2051 19 Apr 2076
31 Mar 2002 28 Mar 2027 21 Apr 2052 11 Apr 2077
20 Apr 2003 16 Apr 2028 6 Apr 2053 3 Apr 2078
11 Apr 2004 1 Apr 2029 29 Mar 2054 23 Apr 2079
27 Mar 2005 21 Apr 2030 18 Apr 2055 7 Apr 2080
16 Apr 2006 13 Apr 2031 2 Apr 2056 30 Mar 2081
8 Apr 2007 28 Mar 2032 22 Apr 2057 19 Apr 2082
23 Mar 2008 17 Apr 2033 14 Apr 2058 4 Apr 2083
12 Apr 2009 9 Apr 2034 30 Mar 2059 26 Mar 2084
4 Apr 2010 25 Mar 2035 18 Apr 2060 15 Apr 2085
24 Apr 2011 13 Apr 2036 10 Apr 2061 31 Mar 2086
8 Apr 2012 5 Apr 2037 26 Mar 2062 20 Apr 2087
31 Mar 2013 25 Apr 2038 15 Apr 2063 11 Apr 2088
20 Apr 2014 10 Apr 2039 6 Apr 2064 3 Apr 2089
5 Apr 2015 1 Apr 2040 29 Mar 2065 16 Apr 2090
27 Mar 2016 21 Apr 2041 11 Apr 2066 8 Apr 2091
16 Apr 2017 6 Apr 2042 3 Apr 2067 30 Mar 2092
1 Apr 2018 29 Mar 2043 22 Apr 2068 12 Apr 2093
21 Apr 2019 17 Apr 2044 14 Apr 2069 4 Apr 2094
12 Apr 2020 9 Apr 2045 30 Mar 2070 24 Apr 2095
4 Apr 2021 25 Mar 2046 19 Apr 2071 15 Apr 2096
17 Apr 2022 14 Apr 2047 10 Apr 2072 31 Mar 2097
9 Apr 2023 5 Apr 2048 26 Mar 2073 20 Apr 2098
31 Mar 2024 18 Apr 2049 15 Apr 2074 12 Apr 2099
#include <stdio.h>
int main( )
{
FILE *fin, *fout;
int j, k, n;
char buff[60];
char yrs[25][4][12];
char cent[100][12];
fin = fopen ( "east.txt", "r" );
fout = fopen ( "e600.txt", "w" );
for ( k=0 ; k<25 ; k++ )
{
fgets ( buff, 59, fin );
//puts ( buff );
for ( n=0 ; n<4 ; n++ )
{
strncpy ( yrs[k][n], buff+n*12, 12 );
//puts ( yrs[k][n] );
}
}
for ( n=0 ; n<4 ; n++ )
{
for ( k=0 ; k<25 ; k++ )
{
strcpy ( cent[n*25+k], yrs[k][n] );
//puts ( cent[n*25+k] );
}
}
fputs ( buff, fout );
for ( k=0 ; k<100 ; k++ )
{
fputs ( cent[k], fout );
//puts ( cent[k] );
}
fclose ( fin );
fclose ( fout );
}
for ( n=0 ; n<4 ; n++ )
{
for ( k=0 ; k<25 ; k++ )
{
strcpy ( cent[n*25+k], yrs[k][n] );
Then why are you telling strncpy() to copy 12 characters instead of 11?JimJoyce said:The strings are only 11 chars long.