how can I modulo operation for strings issue? : <p>I am trying to use modulo operation with my dummy data <code>msg</code> if msg mutiples by 8 <code>msg%8</code> then give me the output of <code>printf("[-] Error: Size too long");</code> if not then it will be okay , but using directly to <code>msg%8</code>doesnt mean to work how can I fix this? </p>

<p>error output</p>

<p><code>Error   C2296    '%': illegal, left operand has type 'char [1000]'</code></p>

<pre><code>int main() {
    char buf[8];
    char msg[1000];
    printf("Enter cookie:\n");
    scanf("%s", buf);
    printf("Your cookie %s \n", buf);

    if (strlen(buf) == 16) {
        printf(" [+] Header received: %d bytes \n", strlen(buf));
        if (stricmp("0x41414141414141", buf) == 0)
        {
            strcpy(buf, "hello");
            printf("Enter msg:\n");
            scanf("%s", msg);
            if (strlen(msg) &lt;= 512) {
                if (msg % 8) {
                    printf("[-] Error: Size too long");
                }
                else {
                    printf("[-] Good");
                }

            }
            else {
                printf("  [-] Error: Invalid \n");
            }
        }
        else {
            printf("  [-] Error: Invalid \n");
        }
    }
    else {
        printf("  [-] Error: Invalid \n");
    }
    return 0;
}
</code></pre>
