Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
私はCでプログラミングするのが初めてで、この問題についてかなり長い間考えてきました:
char* name; scanf("%s", name);
なぜこれが機能しないのですか?たとえば、「Hello」と入力すると、プログラムはエラーを表示します。しかし、上記のコードはこれとまったく同じではありませんか?
char* name = "Hello";