
Video unavailable
This video can't be played right now.
String In Char Array VS. Pointer To String Literal | C Programming Tutorial
The difference between a string stored in a char array vs. a pointer to a string literal in C. In other words the difference between: char s[] = "string" vs. char *s = "string". Importantly, we discuss why we can't modify the string in the case of a pointer to a string literal. Source code: https://github.com/portfoliocourses/c-example-code/blob/main/char_array_vs_string_literal_pointer.c. Check out https://www.portfoliocourses.com to build a portfolio that will impress employers!
Suggested videos

C Programming for Beginners | Full Course
Portfolio Courses · 5:48:38

String In Char Array vs. Pointer To String Literal In C
Jakubication · 2:50

Introduction To Classes And Objects | C++ Tutorial
Portfolio Courses · 11:49

Storing the String Literals
Neso Academy · 3:25

Stanford University Lecture on Strategic Portfolio Management
SmartOrg · 1:15:49

Advanced C 9: String Literal VS char Array
Charles Cabergs · 3:44

Introduction to Pointers | C Programming Tutorial
Portfolio Courses · 24:42

Performing Operations on String Literals
Neso Academy · 4:07

16. Portfolio Management
MIT OpenCourseWare · 1:28:38

Hangman in C - Arrays of strings vs Arrays of Pointers to string literals
Zoe Likoudis · 12:42

14. Portfolio Theory
MIT OpenCourseWare · 1:24:55

C++ 85: const char* vs string — What's the difference?
Selected Topics in IT · 2:34