Skip to content

char array assigned string works, but shouldn't #38

@derrell

Description

@derrell

This program prints "hll" but should err on line 6.

#include <stdio.h>

int main(int argc, char * argv[])
{
    char    string[] = "hello";
    string = "hll";
    printf("[%s]\n", string);
    return 0;
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions