Array of Pointers to Strings in C Last Updated : 14 Nov, 2025 Comments Improve Suggest changes 4 Likes Like Report In C, arrays are data structures that store data in contiguous memory locations. Pointers are variables that store the address of data variables. We can use an array of pointers to store the addresses of multiple elements. In this article, we will learn how to create an array of pointers to strings in C. It is a very effective technique when we want to point at different memory locations of the same data type like a string. C // C Program to Create an Array of Pointers to Strings #include <stdio.h> int main() { // Initialize an array of pointers to strings char* arr[4] = { "C++", "Java", "Python", "JavaScript" }; int n = sizeof(arr) / sizeof(arr[0]); // Print the strings using the pointers printf("Array Elements:\n"); for (int i = 0; i < n; i++) { printf("%s\n", arr[i]); } return 0; } OutputArray Elements: C++ Java Python JavaScript Syntax to Create an Array of Pointers to Strings in CTo create an array of pointers to strings in C we can use the following syntax:char * arr[size] ={ "String1", "String2", ....}Here,char*: is the type of pointers we will store in the array.arr: is the name of the array of pointers.size: is the size of the array of pointers.Each array element will act as a pointer to the first character of an individual string.Note: Storing the strings in this array is more efficient than storing multiple strings in a 2D Array of characters as explained here. Create Quiz Comment R ruchiluckysripada Follow 4 Improve R ruchiluckysripada Follow 4 Improve Article Tags : C Programs C Language C-Pointers C-Arrays C-String C Examples +2 More Explore C BasicsC Language Introduction6 min readIdentifiers in C3 min readKeywords in C2 min readVariables in C4 min readData Types in C3 min readOperators in C8 min readDecision Making in C (if , if..else, Nested if, if-else-if )7 min readLoops in C6 min readFunctions in C5 min readArrays & StringsArrays in C4 min readStrings in C5 min readPointers and StructuresPointers in C7 min readFunction Pointer in C5 min readUnions in C3 min readEnumeration (or enum) in C5 min readStructure Member Alignment, Padding and Data Packing8 min readMemory ManagementMemory Layout of C Programs5 min readDynamic Memory Allocation in C7 min readWhat is Memory Leak? How can we avoid?2 min readFile & Error HandlingFile Handling in C11 min readRead/Write Structure From/to a File in C3 min readError Handling in C8 min readUsing goto for Exception Handling in C4 min readError Handling During File Operations in C5 min readAdvanced ConceptsVariadic Functions in C5 min readSignals in C language5 min readSocket Programming in C8 min read_Generics Keyword in C3 min readMultithreading in C9 min read Like