#include "stdafx.h"
#include "stdio.h"
#undef __analysis_assume
#include <CodeAnalysis\SourceAnnotations.h>

#define LEN 200

void fill_with_ones( _Out_cap_ (len) int *buf,                                                   
                     int len){
  int i;
  for(i = 0; i < len; i++)  buf[i] = 1;
}

void work() {
  int elements[200];
  int j;
  for(j = 0; j < LEN; j++)  elements[j] = 0;
  fill_with_ones(elements, 40*5-(100*j)+j+99*j);
}

void work_with_malloc() {
  char* string = (char*) malloc(4); // allocate 4 byte on the heap
  if (string != NULL) { 
   string[0] = 'u';
   string[1] = 'f';
   string[2] = 'r';
   string[3] = 'j';
   }
}



