home *** CD-ROM | disk | FTP | other *** search
- #include <stdio.h>
- char text1[] = "TEXT1";
- char text2[] = "TEXT2";
-
- main()
- {
- char *pc = text1; /* pc zeigt auf text1 */
- zeiger1(pc); /* pc zeigt immer noch auf text1 */
- puts(pc);
- zeiger2(&pc); /* pc zeigt nun auf text2 */
- puts(pc);
- getchar();
- }
-
- zeiger1(ptr)
- char *ptr;
- {
- ptr = text2; /* die Kopie zeigt auf text2 */
- }
-
- zeiger2(pptr)
- char **pptr;
- {
- *pptr = text2; /* auch pc zeigt auf text2 */
- }
-
-