Submission #1515123


Source Code Expand

#include <stdio.h>
int main(void)
{
char buffer[32] = {};
char outbuf[32]={};
char *pOut = outbuf;
fgets(buffer,sizeof(buffer),stdin);
for(char *p = buffer; *p != '\0'; ++p){
    switch( *p ){
    case 'a':
    case 'e':
    case 'i':
    case 'o':
    case 'u':
    break;
    default:
    outbuf[index++]=*p;
    break;
    }
}
printf(outbuf);
}

Submission Info

Submission Time
Task B - 罠
User iseekautos
Language C (GCC 5.4.1)
Score 0
Code Size 368 Byte
Status CE

Compile Error

./Main.c: In function ‘main’:
./Main.c:17:12: error: ‘index’ undeclared (first use in this function)
     outbuf[index++]=*p;
            ^
./Main.c:17:12: note: each undeclared identifier is reported only once for each function it appears in
./Main.c:21:8: warning: format not a string literal and no format arguments [-Wformat-security]
 printf(outbuf);
        ^
./Main.c:7:1: warning: ignoring return value of ‘fgets’, declared with attribute warn_unused_result [-Wunused-result]
 fgets(buffer,sizeof(buffer),stdin);
 ^