Arrays of Strings in c

Arrays of Strings in c Besides data base applications, another common application of two dimensional arrays is to store an array of strings. In this section we see how an array of strings can be declared and operations such as reading, printing and sorting can be...

string operations in c

string operations in c S.no String functions Description 1 strcat ( )  Concatenates str2 at the end of str1. 2 strncat ( )  appends a portion of string to another 3 strcpy ( )  Copies str2 into str1 4 strncpy ( )  copies given number of characters of one string to...

String in c

String in c The string in C programming language is actually a one-dimensional array of characters which is terminated by a null character ‘\0’. Thus a null-terminated string contains the characters that comprise the string followed by a null. The...

Pointer to an Array in C

Pointer to an Array in C It is most likely that you would not understand this chapter until you are through the chapter related to Pointers in C. So assuming you have bit understanding on pointers in C programming language, let us start: An array name is a constant...

Return array from function in C

Return array from function in C C programming language does not allow to return an entire array as an argument to a function. However, you can return a pointer to an array by specifying the array’s name without an index. You will study pointer in next chapter so...

Passing Arrays as Function Arguments in C

Passing Arrays as Function Arguments in C If you want to pass a single-dimension array as an argument in a function, you would have to declare function formal parameter in one of following three ways and all three declaration methods produce similar results because...