A
aarklon
Hi,
the following is actually a part of the pattern matching program which
i tried ,memset is not setting the entire integer array with
-1
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
int main(void)
{
int maxpat[80];
memset(maxpat,-1,80);
for(i=0;i<80;i++)
printf("%d\t",maxpat);
return EXIT_SUCCESS;
}
but i am getting o/p as
-1 -1 -1 -1 -1 -1 -1 -1
-1 -1
-1 -1 -1 -1 -1 -1 -1 -1
-1 -1
-370086 -370086 -370086 -370086 -370086 -370086 -370086 -370086
-370086 -370086
-370086 -370086 -370086 -370086 -370086 -370086 -370086 -370086
-370086 -370086
-370086 -370086 -370086 -370086 -370086 -370086 -370086 -370086
-370086 -370086
-370086 -370086 -370086 -370086 -370086 -370086 -370086 -370086
-370086 -370086
-370086 -370086 -370086 -370086 -370086 -370086 -370086 -370086
-370086 -370086
-370086 -370086 -370086 -370086 -370086 -370086 -370086 -370086
-370086 -370086
"D:\siju\lcc6\noisedisp.exe"
Return code 0
Execution time 0.048 seconds
Press any key to continue...
why is this so..????
the following is actually a part of the pattern matching program which
i tried ,memset is not setting the entire integer array with
-1
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
int main(void)
{
int maxpat[80];
memset(maxpat,-1,80);
for(i=0;i<80;i++)
printf("%d\t",maxpat);
return EXIT_SUCCESS;
}
but i am getting o/p as
-1 -1 -1 -1 -1 -1 -1 -1
-1 -1
-1 -1 -1 -1 -1 -1 -1 -1
-1 -1
-370086 -370086 -370086 -370086 -370086 -370086 -370086 -370086
-370086 -370086
-370086 -370086 -370086 -370086 -370086 -370086 -370086 -370086
-370086 -370086
-370086 -370086 -370086 -370086 -370086 -370086 -370086 -370086
-370086 -370086
-370086 -370086 -370086 -370086 -370086 -370086 -370086 -370086
-370086 -370086
-370086 -370086 -370086 -370086 -370086 -370086 -370086 -370086
-370086 -370086
-370086 -370086 -370086 -370086 -370086 -370086 -370086 -370086
-370086 -370086
"D:\siju\lcc6\noisedisp.exe"
Return code 0
Execution time 0.048 seconds
Press any key to continue...
why is this so..????