Advertisement
dllbridge

Untitled

May 25th, 2024
833
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 2.35 KB | None | 0 0
  1.  
  2.  
  3. #include   <stdio.h>
  4. #include  <string.h>  
  5.  
  6. struct C_CPU
  7. {
  8.    
  9.        char  szNameCPU[17];
  10.        int   nIndxPassMark;
  11.        int   nTDP;
  12.        int   nYear;
  13.        int   nCores;
  14.        int   nThreads;
  15.        char  szSocket  [17];
  16.        char  szModelCPU[17];
  17.        int   nTechProcess;
  18. };
  19.  
  20. void printInfoCPU(C_CPU *p);  
  21.  
  22.  
  23. //////////////////////////////////////////////////////////////
  24. int main()
  25. {
  26.    
  27.     C_CPU  myCPU ;
  28.     C_CPU  myCPU2;
  29.     C_CPU  myC   ;
  30.  
  31.  
  32.     strcpy(myCPU.szNameCPU,  "N5000");
  33.     myCPU.nIndxPassMark      = 2442  ;
  34.     myCPU.nTDP               =    6  ;
  35.     myCPU.nYear              = 2017  ;
  36.     myCPU.nCores             =    4  ;
  37.     myCPU. nThreads          =    4  ;
  38.     strcpy(myCPU .szSocket, "FCBGA1090");
  39.     strcpy(myCPU. szModelCPU,"Pentium");
  40.     myCPU.nTechProcess       =14;
  41.     //*** * * * * *  * * * * * *
  42.    
  43.     strcpy(myCPU2.szNameCPU, "N4020   ");
  44.     myCPU2.nIndxPassMark     = 1556 ;
  45.     myCPU2.nTDP              =   6  ;
  46.     myCPU2.nYear             =  2019 ;
  47.     myCPU2.nCores            =   2    ;  
  48.     myCPU2.nThreads           =   4 ;
  49.        strcpy(  myCPU2.szSocket,"170") ;
  50.       strcpy (  myCPU2.szModelCPU , "170");
  51.    
  52.     strcpy(myC.szNameCPU, "J1800");
  53.     myC.nIndxPassMark     =  590  ;
  54.     myC.nTDP              =   10  ;
  55.     myC.nYear             = 2013 ;
  56.     myC.nCores            =    2  ;
  57.    myC.nThreads             =  2;
  58.   strcpy( myC.szSocket , " 1090");
  59.     strcpy(  myC.szModelCPU," 1170");
  60.  
  61.    
  62.    
  63.  
  64.          
  65.     printInfoCPU(&myCPU );      
  66.          
  67.     printInfoCPU(&myCPU2);          
  68.     printInfoCPU(&myC   );
  69.  
  70. return 0;
  71. }
  72.  
  73. /////////////////////////////////////////////////////////////
  74. void printInfoCPU(C_CPU *p)                                //
  75. {
  76.      
  77.      printf("Name of CPU %s \n", p->szNameCPU     );
  78.      printf("Passmark =  %5d\n", p->nIndxPassMark );
  79.      printf("TDP      =  %5d\n", p->nTDP          );
  80.      printf("Year     =  %5d\n", p->nYear         );
  81.      printf("Cores    =  %5d\n", p->nCores        );
  82.      printf("Threads  =  %5d\n", p->nThreads      );
  83.      printf("Socket   =  %s \n", p->szSocket      );
  84.      printf("ModelCPU =  %s \n", p->szModelCPU    );
  85.      printf("nTechProcess= %d\n",p-> nTechProcess );
  86.      printf("- - - - - - - - - - - - - \n"        );
  87.      
  88.      
  89.      
  90.  
  91.    
  92. }
  93.  
  94.  
  95.  
  96.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement