File size: 3,789 Bytes
da6962b
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
code`block`FunctionDecl`FunctionDeclRec`ForStmt`ForStmtRec`DoStmt`DoStmtRec`WhileStmt`WhileStmtRec`IfStmt`IfStmtRec`SwitchStmt`SwitchStmtRec`countBlocks`countBlocksRec`countCondition`countVariable`countLiteral`IntegerLiteral`StringLiteral`IfStmt`ForStmt`WhileStmt`DoStmt`SwitchStmt`countLoop`VarDecl`DeclRefExpr`DeclStmt`countDecl`countPointer`writeFunction`CallExpr`BinaryOperator`UnaryOperator`CompoundAssignOperator`countOperand`ArraySubscriptE`RealFaultLocation

int main()`FunctionDecl,false;`1`0`0`0`0`0`0`0`0`0`0`0`1`0`0`0`0`0`0`0`0`0`0`0`0`1`0`0`1`0`0`0`0`0`0`0`0`0
    int i,k;`FunctionDecl,false;`1`0`0`0`0`0`0`0`0`0`0`0`1`0`0`0`0`0`0`0`0`0`0`0`0`2`0`1`3`0`0`0`0`0`0`0`0`0

    scanf("%d",&k);`FunctionDecl,false;`1`0`0`0`0`0`0`0`0`0`0`0`1`0`0`1`1`0`1`0`0`0`0`0`0`0`2`0`2`1`0`1`0`1`0`1`0`0
    struct save ppl[k];`FunctionDecl,false;`1`0`0`0`0`0`0`0`0`0`0`0`1`0`0`0`0`0`0`0`0`0`0`0`0`1`0`1`2`0`0`0`0`0`0`0`0`0

    for(i=0;i<k;i++)`FunctionDecl,false;ForStmt,false;`1`0`1`0`0`0`0`0`0`0`0`0`2`0`1`4`1`1`0`0`1`0`0`0`1`0`4`0`4`0`0`0`2`1`0`3`0`0
        scanf("%s%s",ppl[i].n,ppl[i].p);`FunctionDecl,false;ForStmt,false;`1`0`1`0`0`0`0`0`0`0`0`0`2`0`1`4`1`0`1`0`0`0`0`0`0`0`5`0`5`0`0`1`0`0`0`0`2`0

        if(ppl[i].p[0]=='r')`FunctionDecl,false;ForStmt,false;IfStmt,false;`1`0`1`0`0`0`0`0`1`0`0`0`3`0`2`2`2`1`0`1`0`0`0`0`0`0`2`0`2`0`0`0`1`0`0`1`2`0
        {printf("\n%s",ppl[i].n);`FunctionDecl,false;ForStmt,false;IfStmt,false;`1`0`1`0`0`0`0`0`1`0`0`0`3`0`2`2`1`0`1`0`0`0`0`0`0`0`3`0`3`0`0`1`0`0`0`0`1`1

          ppl[i].p[0]='\0';`FunctionDecl,false;ForStmt,false;IfStmt,false;`1`0`1`0`0`0`0`0`1`0`0`0`3`0`2`2`2`1`0`0`0`0`0`0`0`0`2`0`2`0`0`0`1`0`0`1`2`0
for(i=0;i<k;i++)`FunctionDecl,false;ForStmt,false;`1`0`1`0`0`0`0`0`0`0`0`0`2`0`1`4`1`1`0`0`1`0`0`0`1`0`4`0`4`0`0`0`2`1`0`3`0`0

    if(ppl[i].p[0]!='\0')`FunctionDecl,false;ForStmt,false;IfStmt,false;`1`0`1`0`0`0`0`0`1`0`0`0`3`0`2`2`2`1`0`1`0`0`0`0`0`0`2`0`2`0`0`0`1`0`0`1`2`0
        if(ppl[i].p[1]=='h'||ppl[i].p[0]=='w')`FunctionDecl,false;ForStmt,false;IfStmt,false;IfStmt,false;`1`0`1`0`0`0`0`0`2`0`0`0`4`0`5`4`4`2`0`1`0`0`0`0`0`0`4`0`4`0`0`0`3`0`0`3`4`0

        {printf("\n%s",ppl[i].n);`FunctionDecl,false;ForStmt,false;IfStmt,false;IfStmt,false;`1`0`1`0`0`0`0`0`2`0`0`0`4`0`5`2`1`0`1`0`0`0`0`0`0`0`3`0`3`0`0`1`0`0`0`0`1`1
         ppl[i].p[0]='\0';`FunctionDecl,false;ForStmt,false;IfStmt,false;IfStmt,false;`1`0`1`0`0`0`0`0`2`0`0`0`4`0`5`2`2`1`0`0`0`0`0`0`0`0`2`0`2`0`0`0`1`0`0`1`2`0

for(i=0;i<k;i++)`FunctionDecl,false;ForStmt,false;`1`0`1`0`0`0`0`0`0`0`0`0`2`0`1`4`1`1`0`0`1`0`0`0`1`0`4`0`4`0`0`0`2`1`0`3`0`0
    if(ppl[i].p[0]!='\0')`FunctionDecl,false;ForStmt,false;IfStmt,false;`1`0`1`0`0`0`0`0`1`0`0`0`3`0`2`2`2`1`0`1`0`0`0`0`0`0`2`0`2`0`0`0`1`0`0`1`2`0

        if(ppl[i].p[0]=='m')`FunctionDecl,false;ForStmt,false;IfStmt,false;IfStmt,false;`1`0`1`0`0`0`0`0`2`0`0`0`4`0`3`2`2`1`0`1`0`0`0`0`0`0`2`0`2`0`0`0`1`0`0`1`2`0
        {printf("\n%s",ppl[i].n);`FunctionDecl,false;ForStmt,false;IfStmt,false;IfStmt,false;`1`0`1`0`0`0`0`0`2`0`0`0`4`0`3`2`1`0`1`0`0`0`0`0`0`0`3`0`3`0`0`1`0`0`0`0`1`1

         ppl[i].p[0]='\0';`FunctionDecl,false;ForStmt,false;IfStmt,false;IfStmt,false;`1`0`1`0`0`0`0`0`2`0`0`0`4`0`3`2`2`1`0`0`0`0`0`0`0`0`2`0`2`0`0`0`1`0`0`1`2`0
for(i=0;i<k;i++)`FunctionDecl,false;ForStmt,false;`1`0`1`0`0`0`0`0`0`0`0`0`2`0`1`4`1`1`0`0`1`0`0`0`1`0`4`0`4`0`0`0`2`1`0`3`0`0

    if(ppl[i].p[0]!='\0')`FunctionDecl,false;ForStmt,false;IfStmt,false;`1`0`1`0`0`0`0`0`1`0`0`0`3`0`2`2`2`1`0`1`0`0`0`0`0`0`2`0`2`0`0`0`1`0`0`1`2`0
        printf("\n%s",ppl[i].n);`FunctionDecl,false;ForStmt,false;IfStmt,false;`1`0`1`0`0`0`0`0`1`0`0`0`3`0`2`2`1`0`1`0`0`0`0`0`0`0`3`0`3`0`0`1`0`0`0`0`1`0

return(0);`FunctionDecl,false;`1`0`0`0`0`0`0`0`0`0`0`0`1`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0