code_junkie

String initialization

Nov 10th, 2011
107
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.61 KB | None | 0 0
  1. Str[32] = "";
  2.  
  3. Str[32] = "";
  4.  
  5. char a[] = "a";
  6. char b[] = "a";
  7.  
  8. printf("%i %in", sizeof(a), sizeof(b));
  9.  
  10. 3 2
  11.  
  12. char str1[32] = "";
  13. char str2[32] = "";
  14.  
  15. char str1[32] = {'',''};
  16. char str2[32] = {''};
  17.  
  18. char str1[32] = {'','','','','','','','',
  19. '','','','','','','','',
  20. '','','','','','','','',
  21. '','','','','','','',''};
  22. char str2[32] = {'','','','','','','','',
  23. '','','','','','','','',
  24. '','','','','','','','',
  25. '','','','','','','',''};
Add Comment
Please, Sign In to add comment