It is also common to pass in the length of the string: void function(char *myString, size_t lengthMyString); If n2 is of float type, variable b also should be of float type. In this example, we are passing a pointer to a function. You need to pass an array of pointers, not a pointer to an array of chars. Passing char pointer in C - w3programmers.org . In our first example, we will pass the string to a function that is done for any other ordinary array (i.e., float, integer, or double array). Passing Arrays as Function Arguments in C - Tutorials Point If you want to change value of that character inside a function, then you must pass a pointer to it, but there's no problem in accessing it like you do: if (*val == 'I') { *val = 'S'; } It's more about what does your function expects the input to be, if it expects input to be a pointer to a single character, then it's totally fine for it to receive a char* and only access the data this pointer points to. Of course, you can pass a single character to a function. These are given as follows −. passing function Parameter Passing Techniques in C/C++ - GeeksforGeeks pass char We learned about how to pass structure to a function in one of the earlier tutorial. Point to be noted that when you do point = "blah" you are creating a string literal, and any attempt to modify is Undefined behaviour, so it should really be const char *. How to pass and return array from function in C? - Codeforwin