C Programming Language Part 14 | Strings in C Programming | Pointer and String in C | Premn Arya
DON’T CLICK THIS: https://bit.ly/2OFx7fE
#CProgrammingLanguagePart14 #StringsinCProgramming
#StringsinC #CTutorial #PremnArya #StringFunctionsinC
#StringLenghtFunction #StringCopyFunction #StringExamples
#StringCompare #PointerandStringinC
Hello everyone ☺, I am PN Arya welcome to you on our YouTube channel.
This video explains about String, String functions, and types of string functions. String Length, String Compare, String Concatenate, String Compare has explained with programming examples.
What is String:
A string constant is a one-dimensional array of characters terminated by a null (‘\0’). For example,
Char name[] = {‘P’,‘R’,‘E’,‘M’,‘N’,‘A’,‘R’,‘Y’,‘A’,‘\0’ }
Each character in the array occupies one byte of memory and the last character is always ‘\0’.
String initialization: char name[ ]= “PREMNARYA”;
Pointer and String:
char str[ ]=“Hello”;
char *p=“Hello”;
We can not assign a string of one variable to another string variable. We can assign a char pointer to another char pointer.
main( )
{
char str1[ ]=“Hello”;
char str2[10];
char *s = “Good Morning”;
char *q;
str2 = str1; /* error */
q = s; /* works */
}
Thank you very much.
►For more information updates subscribe to our YouTube Channel:
/ @premnarya
------------------------------------------------------------------------------
Our some other videos playlist:
►Basic Computer Fundamental in English All Videos
• Basic Computer Fundamental in English
►C Programming Language in English All Videos
• C Programming Language in English
-----------------------------------------------------------------------------
►Follow us our social link for regular updates:
Facebook Page: / premnarya10
Twitter: / premnarya10
Instagram: / premnarya10