Advertisement
dllbridge

Untitled

Jul 27th, 2024
230
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.72 KB | None | 0 0
  1.  
  2.  
  3. #include  <stdio.h>
  4.  
  5. struct Dima
  6. {
  7.    
  8.     int nMin;
  9.     int nHours;
  10.     int nDays;
  11.    
  12. }t1, t2;
  13.  
  14.  
  15. /////////////////////////////////////////
  16. void foo(int n)                        //
  17. {
  18.    
  19.     // t1.nMin =
  20.    
  21. }
  22.  
  23.  
  24. /////////////////////////////////////////
  25. void foo(char *p)                      //
  26. {
  27.    
  28.      printf("address of nArr[0] = %d\n",   p);   p = p + 1;
  29.      printf("address of nArr[1] = %d\n",   p);   p ++;    
  30.      printf("address of nArr[2] = %d\n",   p);   p+=1;  
  31.      printf("address of nArr[3] = %d, ",   p);   printf("  nArr[3] = %c \n", p[0]);  
  32. }
  33.  
  34.  
  35. /////////////////////////////////////////
  36. int main()                             //
  37. {
  38.    
  39.     char nArr[5] = "SONY";
  40.    
  41.     foo( nArr);
  42.  
  43. }
  44.  
  45.  
  46.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement