• 《深入理解C指针》第一章 认识指针


     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

    #include <bits/stdc++.h>
    #include <stdlib.h>
    #include <stdio.h>
    using namespace std;
    #define maxn 10005
    #define M 105
    
    int main(){
        int num;
        int *pi = &num;
        printf("Value of pi:%p
    ",pi);
        void *pv = pi;
        pi = (int*)pv;
        printf("Value of pi:%p
    ",pi);
        system("pause");
        return 0;
         
    } 

     

     

     

     

     

     

     

     

     

    #include <bits/stdc++.h>
    #include <stdlib.h>
    #include <stdio.h>
    using namespace std;
    #define maxn 10005
    #define M 105
    
    int main(){
        char *titles[] = {"A Tale of Two Cities",
        "Wuthering Heights","Don Qqixote",
        "Odyssey","Moby-Dick","Hamlet","Gulliver's Travels"};
        char **bestBooks[3];
        char **englishBooks[4];
        bestBooks[0] = &titles[0];
        bestBooks[1] = &titles[3];
        bestBooks[2] = &titles[5];
        englishBooks[0] = &titles[0];
        englishBooks[1] = &titles[3];
        englishBooks[2] = &titles[5];
        englishBooks[3] = &titles[6];
        printf("%s
    ",*englishBooks[1]);
        system("pause");
        return 0;
         
    } 

     

     

     

  • 相关阅读:
    hdu2476
    zoj3469 区间dp好题
    区间dp好题cf149d 括号匹配
    cf1108e 线段树区间更新+扫描线
    完全背包记录路径poj1787 好题
    cf1104d二分+数学
    01背包专题
    hdu1069线性dp
    有源汇的上下界最大流
    有源汇的上下界最大流
  • 原文地址:https://www.cnblogs.com/JasonPeng1/p/11966172.html
Copyright © 2020-2023  润新知