zoukankan      html  css  js  c++  java
  • 《深入理解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;
         
    } 

     

     

     

  • 相关阅读:
    exchangeNetwork
    VRP OS Management
    filleSystemBasises
    Study_way
    1.MySQL 安装
    7.进程池与线程池
    6.线程
    5.进程 -锁
    4.进程-1
    3.多线程TCP协议与加密方式
  • 原文地址:https://www.cnblogs.com/JasonPeng1/p/11966172.html
Copyright © 2011-2022 走看看