Skip to content

Pointers should not be assignable to ints, and vice versa #40

Description

@derrell

Currently, this program generates no errors. It should, for pedagogical reasons, err on the two assignments, even though it's not technically illegal in C.

#include<stdio.h>intmain(intargc, char*argv[])
{
char*p="hello";
inti;
i=p;
p=i;
printf("p=%s\n", p);
return0;
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions