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