source:
CIVL/examples/library/string/memset.cvl@
1e2dd34
| Last change on this file since 1e2dd34 was 790a7da, checked in by , 11 years ago | |
|---|---|
|
|
| File size: 201 bytes | |
| Rev | Line | |
|---|---|---|
| [aa482da] | 1 | #include<string.h> |
| 2 | #include<stdio.h> | |
| 3 | ||
| 4 | int main(){ | |
| 5 | char a[5]; | |
| 6 | ||
| 7 | memset(a, 0, 3); | |
| [790a7da] | 8 | for(int i=0; i<5; i++) printf("a[%d] = %c ", i, a[i]); |
| 9 | $assert ($forall {int k | 0<=k && k<=2 } a[k] == '\0'); | |
| [aa482da] | 10 | } |
Note:
See TracBrowser
for help on using the repository browser.
