source: CIVL/examples/library/string/memset.cvl@ 1e2dd34

1.23 2.0 main test-branch
Last change on this file since 1e2dd34 was 790a7da, checked in by Ziqing Luo <ziqing@…>, 11 years ago

fix the erroneous example

git-svn-id: svn://vsl.cis.udel.edu/civl/trunk@2078 fb995dde-84ed-4084-dfe6-e5aef3e2452c

  • Property mode set to 100644
File size: 201 bytes
RevLine 
[aa482da]1#include<string.h>
2#include<stdio.h>
3
4int 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.