In a C function what's the difference between char and string? -
i'm using template teacher , @ origin of code says:
#include "lab8.h" void main(void) { int response; int count; string words[max_count]; later on in function, whole lot of words set within words string. looking @ lastly line , got confused. thought char declared strings? lastly line do? noticed in couple of function parameter lists later on, there entered "string words" instead of expected mention char or something.
edit:
typedef char string[max_length]; had been written in .h file didn't see it.
c not have basic data type called string.
check lab8.h file carefully. usually, string should typedef of unsigned char.
essentially, string words[max_count]; defines array of variable type string containing max_count number of variables.
c string char
No comments:
Post a Comment