Advertisement
dllbridge

Untitled

Mar 20th, 2024
415
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 2.01 KB | None | 0 0
  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7. #include   <stdio.h>
  8.  
  9.  
  10. int  n = 5;  
  11.  
  12. int *p = &n;
  13.  
  14.  
  15.  
  16.  
  17. ///////////////////////////////////////////////////
  18. int main()                                       //
  19. {
  20.    
  21.     printf(" n = %d\n",  n);
  22.     printf(" p = %d\n",  p);    
  23.     printf("*p = %d\n", *p);
  24.     printf("&n = %d\n", &n);       
  25. }
  26.  
  27.  
  28.  
  29.  
  30.  
  31.  
  32.  
  33.  
  34.  
  35.  
  36.  
  37.  
  38.  
  39.  
  40.  
  41.  
  42.  
  43.  
  44.  
  45.  
  46. /*
  47.  
  48. #include   <stdio.h>
  49.    
  50.  
  51. char   sz[99]  = "SONY";
  52.  
  53.  
  54.  
  55.  
  56. ///////////////////////////////////////////////////
  57. int main()                                       //
  58. {
  59.    
  60.     for(int i = 0; i < 4; i++)
  61.     {
  62.        
  63.     }
  64.    
  65.    
  66. }
  67.  
  68.  
  69. */
  70.  
  71.  
  72.  
  73.  
  74.  
  75.  
  76.  
  77.  
  78.  
  79.  
  80.  
  81.  
  82.  
  83.  
  84.  
  85.  
  86.  
  87. /*
  88. #include   <stdio.h>
  89.    
  90.  
  91. char      c  = 'B';
  92. int       n  =  71;
  93. __int8    n2 = 'Z';
  94. float     f1;
  95. double    f2;
  96. ///////////////////////////////////////////////////
  97. int main()                                       //
  98. {
  99.    
  100.     printf("n2 = %d\n", n2);    
  101.    
  102.    
  103.     printf("size of char   = %d\n", sizeof(c ) );
  104.     printf("size of int    = %d\n", sizeof(n2) );  
  105.     printf("size of float  = %d\n", sizeof(f1) );  
  106.     printf("size of double = %d\n", sizeof(double) );  
  107.    
  108.    
  109.    
  110.        
  111. }
  112.  
  113.  
  114.  
  115.  
  116. */
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.  
  130.  
  131.  
  132.  
  133. /*
  134.  
  135. #include   <stdio.h>
  136.    
  137.  
  138. char c = 'B';
  139.  
  140.  
  141. ///////////////////////////////////////////////////
  142. int main()                                       //
  143. {
  144.    
  145.     int n;
  146.    
  147.    
  148.     if(n == 1)
  149.     {
  150.        printf("c = %d\n", c);      
  151.        if(n == 1)
  152.     }
  153.  
  154.                
  155.     printf("c = %d\n", c);  
  156.    
  157.    
  158.     switch(c)
  159.     {
  160.        
  161.         case 66:  printf("B\n");    
  162.                   break;
  163.                  
  164.         case 67:  printf("C\n");    
  165.                   break;                 
  166.     }
  167.  
  168. return 0;
  169. }
  170.  
  171.  
  172.  
  173. */
  174.  
  175.  
  176. /*
  177.  
  178. #include   <stdio.h>
  179.    
  180.  
  181. char c = 'B';
  182.  
  183.  
  184. ///////////////////////////////////////////////////
  185. int main()                                       //
  186. {
  187.    
  188.  
  189.                
  190.     printf("c = %d\n", c);  
  191.    
  192.    
  193.     switch(c)
  194.     {
  195.        
  196.         case 66:  printf("B\n");    
  197.                   break;
  198.                  
  199.         case 67:  printf("C\n");    
  200.                   break;                 
  201.     }
  202.  
  203. return 0;
  204. }
  205.  
  206. */
  207.  
  208.  
  209.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement