Warning: Declaration of action_plugin_changes::register($controller) should be compatible with DokuWiki_Action_Plugin::register(Doku_Event_Handler $controller) in /volume1/web/dokuwiki/lib/plugins/changes/action.php on line 0 c_p4 [Protocol Engineering Lab.]

User Tools

Site Tools


c_p4
/* p4.c: subtraction */
 
#include <stdio.h>
 
int main(void) {
    int *ip, *ip2, *ip3;
    int n = 10;
    int a[] = {1, 2, 3, 4, 5};
 
    ip = &n;
    ip2 = ip;
 
    printf("%d %d %d\n", n, *ip, *ip2);
    printf("%p %p %p\n", &n, &ip, &ip2);
    printf("%p %p %p\n", &n, ip, ip2);
 
    ip2 = a;
    ip3 = ip2 + 1;
 
    printf("%d %d %d\n", a[0], *ip2, *ip3);
    printf("%p %p %p\n", &a[0], &ip2, &ip3);
    printf("%p %p %p\n", &a, ip2, ip3);
 
    return(0);
}
c_p4.txt · Last modified: 2015/02/08 22:19 by jonghyouk