//
archives

Archive for

Memory allocation and variables in C language

Program1 Program2 Program1 print out the string, program2 print out a piece of code is garbled. I remember when talked about learning C language, the string is treated as an array of characters to deal with. So character array name is equivalent to a pointer pointing to the first address. Both statements should return same … Continue reading

Monkey eat peach

Monkey picked number of peach, half eaten immediately, not enough, then ate one more. Next morning ate the half peach remaining, then eat one more. After that, the monkey keep ate the remaining half and additional one every morning. Until 10th day in the morning, only one peach left. How many peach the monkey picked … Continue reading