Advertisement
dllbridge

Untitled

Jan 21st, 2024
1,058
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.53 KB | None | 0 0
  1.  
  2.  
  3. #include   <stdio.h>
  4.  
  5. int x_foo(char *p);  
  6.  
  7. char sz [99] = "SONY Pictures",
  8.      sz2[99] = {'S', 'O', 'N'};  
  9.      
  10. int nArr[66] = {71, 1, 2};    
  11.  
  12. ///////////////////////////////////////////////
  13. int main()                                   //
  14. {
  15.    
  16.     printf("Len of sz = %d\n", x_foo(sz) );
  17.    
  18. }
  19.  
  20.  
  21.  
  22. ///////////////////////////////////////////////
  23. int x_foo(char *p)                           //  
  24. {
  25.    
  26.     int i = 0;
  27.    
  28.     for( ; i < 10000; i++)
  29.     {
  30.        
  31.        
  32.        if( p[i] == 0) break;   
  33.        
  34.     }
  35.    
  36.    
  37. return i;  
  38. }
  39.  
  40.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement