Please note:
- Your code won't compile.
- You are ignoring
memset
return value. - You didn't show us the declaration of the
Deviceptr
variable.
if Deviceptr
is an array of integers
then i
value should be
0
.
[update: fixed
C
code]
#include <stdio.h>
#include <memory.h>
#define Max_port 4
int main()
{
char Deviceptr[Max_port];
int i;
memset(Deviceptr,0,sizeof(Deviceptr));
i=Deviceptr[0];
printf("i = %d\n", i);
return 0;
}
[/update]