SHARE
TWEET

mine.3.0

a guest May 19th, 2019 88 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include<stdio.h>
  2.  
  3. int double_string (char *x)
  4. {
  5.   char copy[1024];
  6.   int i = 0;
  7.   while (x[i] != '\0')
  8.   {
  9.     copy[i] = x[i];
  10.     i = i + 1;
  11.   }
  12.   copy[31] = '\0';
  13.   for (int m = 0; m < 65; m++)
  14.   {
  15.     x[i] = copy[m];
  16.     i = i + 1;
  17.   }
  18.   return 0;
  19. }
  20. int swap_letters(char replacer, char letter, char *string)
  21. {
  22.    
  23. }
  24.  
  25. int main()
  26. {
  27.   char str[1024] = "Now I know how to program in C!";
  28.   printf("%s\n", str);
  29.   double_string(str);
  30.   printf("%s\n", str);
  31.   //swap_letters(*'o', *'i', str);
  32.   return 0;
  33. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top