Advertisement
RicardasSim

while comma

Mar 22nd, 2019
253
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.44 KB | None | 0 0
  1. //-std=c99 -Wall -Wextra -Wpedantic -Wshadow
  2.  
  3. #include <stdio.h>
  4. #include <stdlib.h>
  5.  
  6. int main (int argc, char **argv){
  7.  
  8.     char tstStr[]="just testing\n";
  9.  
  10.     char c;
  11.     char *str;
  12.    
  13.     str=tstStr;
  14.    
  15.     while(c=*str++,c)
  16.     {
  17.         printf("%c",c);
  18.     }
  19.  
  20.    
  21.     str=tstStr;
  22.    
  23.     while(*str)
  24.     {
  25.         printf("%c",*str);
  26.         str++;
  27.     }
  28.  
  29.    
  30. return 0;
  31. }
  32.  
  33. /*
  34. just testing
  35. just testing
  36. */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement