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 Warning: Declaration of syntax_plugin_code::handle($aMatch, $aState, $aPos, &$aHandler) should be compatible with DokuWiki_Syntax_Plugin::handle($match, $state, $pos, Doku_Handler $handler) in /volume1/web/dokuwiki/lib/plugins/code/syntax.php on line 42 Warning: Declaration of syntax_plugin_code::render($aFormat, &$aRenderer, &$aData) should be compatible with DokuWiki_Syntax_Plugin::render($format, Doku_Renderer $renderer, $data) in /volume1/web/dokuwiki/lib/plugins/code/syntax.php on line 42 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