Guest User

Untitled

a guest
Jan 22nd, 2019
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1. char ch[2];
  2. ch[0] = 'h';
  3. ch[1] = '';
  4.  
  5. char ch[1];
  6. ch[0] = 'h';
  7.  
  8. char ch[2] = "h";
  9.  
  10. char ch[2] = {0};
  11. ch[0] = 'h';
  12.  
  13. char ch = 'h';
  14.  
  15. char somestring[100];
  16. char pos = 0;
  17. while( ... ) {
  18. somestring[pos] = 'x'; /* or whatever */
  19. pos = pos + 1;
  20. }
  21. somestring[pos] = 0;
  22.  
  23. int ind=0;
  24. while(...)
  25. {
  26. ch[ind++]='h';
  27. }
  28. ch[ind]='';
Add Comment
Please, Sign In to add comment