Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- #include <string.h>
- char *pszBUF;
- char *pszPos;
- int accum(int n, const char *psz);
- ///////////////////////////////////////////////////////////////////////////////
- int main() //
- {
- int nArr[17];
- accum(1, "void");
- nArr[1] = accum(0, "SONY");
- nArr[2] = accum(0, " Pictures");
- nArr[3] = accum(0, " TDK");
- printf("%s\n", pszBUF);
- printf("nArr[1] = %d\n", nArr[1]);
- printf("nArr[2] = %d\n", nArr[2]);
- printf("nArr[3] = %d\n", nArr[3]);
- // printf("%s\n", p[2]);
- printf("%s\n", pszBUF + nArr[3]);
- }
- // n = 1; выделим 1000 символов
- // n = 2; расширим до 2000 байт
- ////////////////////////////////////////////////////////////////////////////////
- int accum(int n, const char *psz)
- {
- switch(n)
- {
- case 1: pszBUF = (char*)malloc ( 1000);
- pszPos = pszBUF;
- *pszBUF = 0; return 0;
- case 2: pszBUF = (char*)realloc(pszBUF, 2000); return 0;
- }
- int nLen = strlen(psz);
- strcat(pszPos, psz);
- int nOffset = pszPos - pszBUF;
- pszPos += nLen;
- return nOffset;
- }
- /*
- Passmark CPU Mark:
- VIA C7-M = 98, 15 wt,
- P4 2,4GHz = 131, 60 wt, 2004 1-1 Pentium 130 нм
- N270 = 136, 2,5 wt, 2008 1-2 PBGA437 Atom 45 нм
- XP 1600+ = 174, 63 wt, 2001 1-1 462 Athlon 180 нм
- D410 = 180, 10 wt, 2010 1-2 FCBGA559 Atom 45 нм
- P3 1400 = 193, 31 wt, 2001 1-1 370 Pent 3 130 нм
- D425 = 204, 10 wt, 2010 1-2 FCBGA559 Atom 45 нм
- XP 2500+ = 231, 68 wt, 2003 1-1 462 Athlon 130 нм
- D2500 = 233, 10 wt, 2010 2-2 FCBGA559 Atom 32 нм
- N2600 = 316, 3,5 wt, 2011 2-4 FCBGA559 Atom 32 нм
- N570 = 341, 8,5 wt, 2011 2-4 FCBGA559 Atom 45 нм ASUS Eee PC 1011PX
- 330 = 363, 8 wt, 2008 2-4 PBGA437 Atom 45 нм
- D525 = 398, 13 wt, 2010 2-4 FCBGA559 Atom 45 нм
- N2800 = 444, 6,5 wt, 2011 2-4 FCBGA559 Atom 32 нм
- N2807 = 486, 4,3 wt, 2014 2-2 FCBGA1170 Celeron 22 нм
- J1800 = 590, 10 wt, 2013 2-2 FCBGA1170 Celeron 22 нм
- N3050 = 592, 6 wt, 2015 2-2 FCBGA1170 Celeron 14 нм
- N3060 = 658, 6 wt, 2016 2-2 FCBGA1170 Celeron
- E6600 = 919, 65 wt, 2007 2-2 Core 65 нм
- 3205U = 946, 15 wt, 2015 2-2 FCBGA1168 Celeron
- 1037U = 978, 17 wt, 2013 Celeron
- N3350 = 1108, 6 wt, 2016 2-2 FCBGA1296 Celeron
- j1900 = 1151, 10 wt, 2013 4-4 FCBGA1170 Celeron 22 нм
- N3160 = 1180, 6 wt, 2016 4-4 FCBGA1170 Celeron 14 нм
- j3355 = 1197, 10 wt, 2016 2-2 FCBGA1296 Celeron 14 нм
- j3060 = 1269, 6 wt, 2016 4-4 FCBGA1170 Celeron 14 нм
- i3 530 = 1501, 73 wt, 2010 2-4 FCLGA1156 Core 32 нм
- N4020 = 1556, 6 wt, 2019 2-2 Celeron
- M-5Y10 = 1644, 4,5 wt, 2014 2-4 FCBGA1234 Core 14 нм Broadwell-Y (2014)
- M-5Y10c = 1892, 4,5 wt, 2014 2-4 FCBGA1234 Core 14 нм
- m3-6y30 = 2170, 4,5 wt, 2015 2-4 FCBGA1515 Core m3 14 нм Skylake-Y (2015)
- 8200y = 2215, 5 wt, 2018 2-4 FCBGA1515 Core i5 14 нм Amber Lake-Y
- 6006u = 2276, 15 wt, 2016 2-4 FCBGA1356 Core i3 14 нм
- N5000 = 2442, 6 wt, 2017 4-4 FCBGA1090 Pentium 14 нм
- i5-7y54 = 2649, 4,5 wt, 2016 2-4 FCBGA1515 Core i5 14 нм Kaby Lake (2016?2019)
- 10100y = 2857, 5 wt, 2018 2-4 BGA1377 Core i3 14 нм
- j4125 = 2956, 10 wt, 2019 4-4 FCBGA1090 Celeron 14 нм
- 7200u = 3381, 15 wt, 2016 2-4 FCBGA1356 Core i5 14 нм
- N5095 = 4105, 15 wt, 2021 4-4 Celeron
- 7505 = 5199, 15 wt, 2020 2-4 BGA1449 Pentium
- N100 = 5489, 6 wt, 2023 -4 FCBGA1264 Intel 7 нм
- */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement