source: CIVL/examples/library/string/memset.cvl@ ecfe5bf

1.23 2.0 main test-branch
Last change on this file since ecfe5bf was 6f8bc6ea, checked in by Manchun Zheng <zmanchun@…>, 11 years ago

cleaned up stdio library implementation; fixed io, mpi transformer and some examples accordingly.

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

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