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

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

added a test for memset().

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

  • Property mode set to 100644
File size: 206 bytes
RevLine 
[aa482da]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 {i= 0 .. 2} a[i]==0;
10 $assert a[0]==0;
11}
Note: See TracBrowser for help on using the repository browser.