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 ;
- strcpy(myCPU2.szNameCPU, "N9874");
- myCPU2.nIndxPassMark = 1786 ;
- myCPU2.nTDP = 15 ;
- myCPU2.nYear = 2011 ;
- myCPU2.nCores = 3 ;
- strcpy(myC.szNameCPU, "uytyy");
- myC.nIndxPassMark = 5566 ;
- myC.nTDP = 12 ;
- myC.nYear = 2015 ;
- myC.nCores = 8 ;
- /*
- myCPU. nThreads = 1090;
- myCPU. nTechProcess = 14;*/
- 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("- - - - - - - - - - - - - \n" );
- /*
- printf(" nTechProcess= %d\n",p-> nTechProcess);
- printf(" nThreads= %d\n",p-> nThreads);
- */
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement