Return to Snippet

Revision: 23150
at January 31, 2010 13:51 by sebastianf


Initial Code
/* replaces tab with -> */
#include <stdio.h>


int main (int argc, const char * argv[]){
int c;

c=getchar();
     while(c!=EOF){
          if(c=='\t'){
               c='-';
               putchar(c);
               c='\b';
               putchar(c);
               c='>';
               putchar(c);
               c=getchar();
          }
          else if(c=='\b'){     /* funktioniert irgendwie nicht */
               c='-';
               putchar(c);
               c='\b';
               putchar(c);
               c='<';
               putchar(c);
               c=getchar();
          }
          else{
               putchar(c);
               c=getchar();
          }
     }
}

Initial URL

                                

Initial Description

                                

Initial Title
replace tab with ->

Initial Tags
replace

Initial Language
C