Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR C

how to read character from a string in c

void main(){
char arr[100]
scanf("%s",arr); // or gets(arr); to include spaces
for(int i=0; arr[i] != ''; ++i)
{
printf("%c
",arr[i]);
}
}
 
PREVIOUS NEXT
Tagged: #read #character #string
ADD COMMENT
Topic
Name
7+4 =