Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <string.h>
- struct C_CPU
- {
- char szNameCPU[17];
- int nIndxPassMark;
- int nTDP;
- int nYear;
- int nCores;
- int nThreads;
- char szSocket [17];
- char szModelCPU[17];
- int nTechProcess;
- };
- void printInfoCPU(C_CPU *p);
- //////////////////////////////////////////////////////////////
- int main()
- {
- C_CPU myCPU ;
- C_CPU myCPU2;
- C_CPU myC ;
- strcpy(myCPU.szNameCPU, "N5000");
- myCPU.nIndxPassMark = 2442 ;
- myCPU.nTDP = 6 ;
- myCPU.nYear = 2017 ;
- myCPU.nCores = 4 ;
- myCPU. nThreads = 4 ;
- strcpy(myCPU .szSocket, "FCBGA1090");
- strcpy(myCPU. szModelCPU,"Pentium");
- myCPU.nTechProcess =14;
- //*** * * * * * * * * * * *
- strcpy(myCPU2.szNameCPU, "N4020 ");
- myCPU2.nIndxPassMark = 1556 ;
- myCPU2.nTDP = 6 ;
- myCPU2.nYear = 2019 ;
- myCPU2.nCores = 2 ;
- myCPU2.nThreads = 4 ;
- strcpy( myCPU2.szSocket,"170") ;
- strcpy ( myCPU2.szModelCPU , "170");
- strcpy(myC.szNameCPU, "J1800");
- myC.nIndxPassMark = 590 ;
- myC.nTDP = 10 ;
- myC.nYear = 2013 ;
- myC.nCores = 2 ;
- myC.nThreads = 2;
- strcpy( myC.szSocket , " 1090");
- strcpy( myC.szModelCPU," 1170");
- printInfoCPU(&myCPU );
- printInfoCPU(&myCPU2);
- printInfoCPU(&myC );
- return 0;
- }
- /////////////////////////////////////////////////////////////
- void printInfoCPU(C_CPU *p) //
- {
- printf("Name of CPU %s \n", p->szNameCPU );
- printf("Passmark = %5d\n", p->nIndxPassMark );
- printf("TDP = %5d\n", p->nTDP );
- printf("Year = %5d\n", p->nYear );
- printf("Cores = %5d\n", p->nCores );
- printf("Threads = %5d\n", p->nThreads );
- printf("Socket = %s \n", p->szSocket );
- printf("ModelCPU = %s \n", p->szModelCPU );
- printf("nTechProcess= %d\n",p-> nTechProcess );
- printf("- - - - - - - - - - - - - \n" );
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement