Advertisement
dllbridge

Untitled

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