# Include "stdafx. H "# include <iostream> using namespace STD; int _ tmain (INT argc, _ tchar * argv []) {cout <Endl <"questions about arrays" <Endl; int A [] = {1, 2, 3, 4, 5 }; int * PTR = (int *) (& A + 1); cout <"* (a + 1) =" <* (a + 1) <Endl; cout <"* (PTR-1) =" <* (PTR-1) <Endl; cout <Endl; cout <Endl <"questions about floating point rounding and retaining two decimal places" <Endl; float n = 1.235567f; int m = 0; M = N * 100 + 0.5f; n = m/100366f; cout <"n =" <n <Endl; cout <"1234532532/100 running f =" <12345/100 running F <Endl; cout <Endl <"about strcpy parameter length" <Endl; char Dest [100], Src [10]; for (INT I = 0; I <sizeof (SRC)/sizeof (SRC [0]); ++ I) {SRC [I] = 'a';} SRC [(sizeof (SRC)/sizeof (SRC [0])-1] = '\ 0 '; cout <Endl <"Source string warranty ends with \ 0" <Endl; strcpy (DEST, Src ); cout <"DEST =" <DEST <Endl; return 0 ;}
Execution result