User Profile
Collapse
-
what should I initialize it as? a pointer? -
Would I want to assign the null at the end of the array, something like this.
...Code:#include <stdio.h> #include <stdlib.h> #include <string.h> #include <ctype.h> int main(int argc, char *argv[]) { char student [100]; char num [100]; int con [100]; char i = 0; int k,m,j,n = 0;Leave a comment:
-
Yes you were right in geussing the types except for student, i made student an array that the file is being read into. Also i apologize for not using the code tags.
I changed it around a bit and this is what I have now:
...Code:int main(int argc, char *argv[]) { char student [100]; char num [100]; int con [100]; char i = 0; int k,m,j,nLeave a comment:
-
How to use isdigit function?
Hi,
I am trying to use the isdigit function to extract digits from an array containing a string file. What I am wondering is if the variable used in it can be a char?
this is what I have,
for(k=0;k<10;k+ +)
{
i = student [k];
if( isdigit(i))
num [j] = i;
j++;
printf("%s",num );
...
No activity results to display
Show More
Leave a comment: