วันเสาร์ที่ 27 พฤศจิกายน พ.ศ. 2553

C programming: Pointers

2. Write a C program to sum a sequence of integer from 1, 2,3,4, …, N using
- an array a[] to store the sequence
- a pointer *a with dynamic memory allocation to store the sequence



ผลลัพธ์








3. Write a C program from slide page 23 (See below) of lecture 2, and discuss
the answer


ผลลัพธ์









 

4. Write a C program on slide 31 (See below) and discuss answer

ผลลัพธ์



5. Write a C program to perform two functions on page 32 (See below) and
discuss their differences
การประกาศตัวแบบอะเรย์

ประกาศตัวแปรแบบพอยเตอร์



ผลลัพธ์เหมือนกัน


6. Write a C program that create a segmentation fault and discuss the cause of the
Error


ผลลัพธ์





7. Write a C program that contain codes in slides 40, 41, 42, and 43 (See below),
and discuss them


ผลลัพธ์




ผลลัพธ์


ผลลัพธ์



ผลลัพธ์



8. Write a C program that use “structure” in slide 53 and 54 (See below), and
discuss them

ผลลัพธ์


ผลลัพธ์

ไม่มีความคิดเห็น:

แสดงความคิดเห็น