Advertisement
dllbridge

Untitled

Mar 11th, 2023
895
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 2.69 KB | None | 0 0
  1.  
  2.  
  3.  
  4. #include   <stdio.h>
  5.  
  6.  
  7. ////////////////////////////
  8. class Ct
  9. {
  10.  
  11.       public:  
  12.     int key;
  13.     int inf;
  14.    
  15.     private:
  16.     Ct *pNext;
  17.    
  18.     int foo()
  19.     {
  20.        key = inf + 5;  
  21.     }
  22. };
  23.  
  24.  
  25.  
  26. ////////////////////////////////////////////////////
  27. int main()                                        //
  28. {
  29.  
  30.     Ct ct;
  31.    
  32.    
  33.     ct.key = 57987;
  34.  
  35. }
  36.  
  37.  
  38.  
  39.  
  40.  
  41.  
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63. /*
  64.  
  65. #include   <stdio.h>
  66.  
  67.  
  68. int  narr[7] = { 0 ,  1 ,  2 };
  69.  
  70. char sz[123] = "Paramount_",
  71.      sz2[23] = "SONY Pictures";
  72.  
  73.  
  74. void strcpy(char *psz2, const char *psz1);
  75.  
  76. ////////////////////////////////////////////////////
  77. int main()                                        //
  78. {
  79.  
  80.    
  81.     strcpy(sz2,  sz);
  82.  
  83.     printf("sz2 = %s\n", sz2);
  84. }
  85.  
  86.  
  87.  
  88.  
  89.  
  90.  
  91. /////////////////////////////////////////////////////
  92. void strcpy(char *psz2, const char *psz1)          //
  93. {
  94.    
  95.      int i = 0;
  96.          
  97.      while(psz1[++i] );
  98.  
  99.  
  100.      for(int j = 0; j < i; j++)
  101.      {
  102.            
  103.         psz2[j] = psz1[j]; 
  104.      }
  105.      
  106.      psz2[i] = 0;
  107. }
  108.  
  109.  
  110.  
  111. */
  112.  
  113.  
  114.  
  115. /*
  116.  
  117.  
  118. #include   <stdio.h>
  119.  
  120.  
  121. int  narr[7] = { 0 ,  1 ,  2 };
  122.  
  123. char sz[123] = {"Paramount_"};
  124.  
  125. int _strlen(const char *jhgjkhgkhjhgkjhgkjhgkjhkjhgjhgjhgkhg);  
  126.  
  127.  
  128. ////////////////////////////////////////////////////
  129. int main()                                        //
  130. {
  131.  
  132.    
  133.     int nRes = _strlen(sz);
  134.  
  135.     printf("nRes = %d\n", nRes);
  136. }
  137.  
  138.  
  139.  
  140.  
  141.  
  142.  
  143. /////////////////////////////////////////////////////
  144. int _strlen(const char *p)                         //
  145. {
  146.    
  147.    
  148.      int i = 0;
  149.      
  150.      
  151.      
  152.      while(p[++i] );
  153.  
  154.      
  155. return i;
  156. }
  157.  
  158.  
  159.  
  160. */
  161.  
  162.  
  163.  
  164.  
  165. /*
  166. #include   <stdio.h>
  167.  
  168.  
  169. int  narr[7] = { 0 ,  1 ,  2 };
  170.  
  171. char sz[123] = {"Paramount"};
  172.  
  173. int _strlen(const char *jhgjkhgkhjhgkjhgkjhgkjhkjhgjhgjhgkhg);  
  174.  
  175.  
  176. ////////////////////////////////////////////////////
  177. int main()                                        //
  178. {
  179.  
  180.    
  181.     int nRes = _strlen(sz);
  182.  
  183.     printf("nRes = %d\n", nRes);
  184. }
  185.  
  186.  
  187.  
  188.  
  189.  
  190.  
  191. /////////////////////////////////////////////////////
  192. int _strlen(const char *p)                               //
  193. {
  194.    
  195.    
  196.      int nSymb = 0;
  197.      
  198.      
  199.      
  200.      for(int i = 0; p[i] != 0; i++)
  201.      {
  202.            
  203.         nSymb ++;  
  204.      }
  205.      
  206. return nSymb;
  207. }
  208.  
  209.  
  210.  
  211. */
  212.  
  213.  
  214.  
  215.  
  216.  
  217.  
  218.  
  219.  
  220.  
  221. /*
  222.  
  223. #include   <stdio.h>
  224.  
  225.  
  226. int  narr[7] = { 0 ,  1 ,  2 };
  227.  
  228. char sz[123] = { 84, 'D', 'K'};
  229.  
  230. int _strlen(char *p);  
  231.  
  232.  
  233. ////////////////////////////////////////////////////
  234. int main()                                        //
  235. {
  236.      
  237.      
  238.      
  239.     printf(sz);
  240.    _strlen(sz);
  241.  
  242.  
  243. }
  244.  
  245.  
  246.  
  247.  
  248.  
  249.  
  250. /////////////////////////////////////////////////////
  251. int _strlen(char *p)                               //
  252. {
  253.    
  254.    
  255. }
  256.  
  257. */
  258.  
  259.  
  260.  
  261.  
  262.  
  263.  
  264.  
  265.  
  266.  
  267.  
  268.  
  269.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement