source:
CIVL/examples/languageFeatures/memcpy.cvl@
d8bb437
| Last change on this file since d8bb437 was d8bb437, checked in by , 13 years ago | |
|---|---|
|
|
| File size: 198 bytes | |
| Line | |
|---|---|
| 1 | #include<civlc.h> |
| 2 | |
| 3 | void main() { |
| 4 | int a[10], b[5]; |
| 5 | |
| 6 | for (int i = 0; i < 10; i++) { |
| 7 | a[i] = i; |
| 8 | } |
| 9 | memcpy(b, a, 5*sizeof(int)); |
| 10 | for (int i = 0; i < 5; i++) { |
| 11 | $assert b[i] == i; |
| 12 | } |
| 13 | } |
Note:
See TracBrowser
for help on using the repository browser.
