Advertisement
Guest User

Shoci

a guest
Sep 24th, 2017
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.38 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3. #include <string.h>
  4.  
  5. void printString(char str[]) {
  6.   printf("Print as string: ");
  7.   puts(str);
  8.   printf("Print as chars: ");
  9.   for(int i=0; i<strlen(str); i++)
  10.     putchar(str[i]);
  11. }
  12. int main(){
  13.   printf("** Welcome to the Double Dutch game **\n");
  14.   char myString[36] = "charcharcharcharchar";
  15.   printString(myString);
  16.  
  17.   return 0;
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement