[ create a new paste ] login | about

Link: http://codepad.org/HtV1eYkL    [ raw code | output | fork ]

C, pasted on Feb 11:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
void main()
{
char string[]=  "Write_A25_3_5_HZ;
char *array[10];
int i=0;

array[i] = strtok(string,"/");

while(array[i]!='\0')
{
   array[++i] = strtok('\0',"/");
}
 for (i = 0; i < 3; ++i) 
        printf("%s\n", array[i]);
}


Output:
1
2
3
4
5
6
7
In function 'main':
Line 3: error: missing terminating " character
Line 4: error: expected expression before 'char'
Line 7: error: 'array' undeclared (first use in this function)
Line 7: error: (Each undeclared identifier is reported only once
Line 7: error: for each function it appears in.)
Line 2: warning: return type of 'main' is not 'int'


Create a new paste based on this one


Comments: