Advertisement
dllbridge

Untitled

Dec 21st, 2022
757
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 1.12 KB | None | 0 0
  1.  
  2.  
  3.  
  4.  
  5. #include  <stdio.h>
  6. #include <iostream>
  7. using namespace std;
  8.  
  9.  
  10.  
  11.  
  12. int   n = 52;            //  4 Байта  (32 бита)
  13.  
  14. char  c = 'Y';           //  1 Байт   (8 бит)
  15.  
  16. char  sz [43] = "SONY";
  17. char  sz1[43] = {'A', 83, 'S', 'A' };
  18.  
  19. //////////////////////////////////////////////////////
  20. int main()                                          //
  21. {
  22.  
  23.  
  24.    
  25.     cout << c ;
  26.    
  27.     printf(" = %d \n", c);
  28.  
  29.     printf(   "%s \n", sz);
  30.    
  31.     sz[0] = 80;
  32.    
  33.     printf(   "%s \n", sz1);    
  34. }
  35.  
  36.  
  37.  
  38.  
  39.  
  40.  
  41.  
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54. /*
  55. #include  <stdio.h>
  56. #include <iostream>
  57. using namespace std;
  58.  
  59.  
  60.  
  61.  
  62. int n = 52;
  63.  
  64.  
  65.  
  66. //////////////////////////////////////////////////////
  67. int main()                                          //
  68. {
  69.  
  70.  
  71.     switch(n)
  72.     {
  73.  
  74.        case 2:  cout << 3 + 2 << endl;
  75.                 break;
  76.                
  77.        case 5:  printf("%d", 5 - 2);
  78.                 break;
  79.        
  80.        case 8:  cout << "Hello, Vlad!";
  81.                 break;
  82.                
  83.        case 9:  cout << "Hello, Dima!";
  84.                 break;             
  85.        
  86.        default: cout << "default"; 
  87.     }
  88.    
  89.  
  90. }
  91.  
  92.  
  93.  
  94.  
  95.  
  96. */
  97.  
  98.  
  99.  
  100.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement