C string functions πŸ” 

C string functions tutorial example explained #C #string #functions int main(){ char string1[] = "Bro"; char string2[] = "Code"; strlwr(stri...

C string functions πŸ” 
Bro Code
129.1K views β€’ Oct 6, 2021
C string functions πŸ” 

About this video

C string functions tutorial example explained

#C #string #functions

int main(){

char string1[] = "Bro";
char string2[] = "Code";

strlwr(string1); // converts a string to lowercase
//strupr(string1); // converts a string to uppercase
//strcat(string1, string2); // appends string2 to end of string1
//strncat(string1, string2, 1); // appends n characters from string2 to string1
//strcpy(string1, string2); // copy string2 to string1
//strncpy(string1, string2, 2); // copy n characters of string2 to string1

//strset(string1, '?'); //sets all characters of a string to a given character
//strnset(string1, 'x', 1); //sets first n characters of a string to a given character
//strrev(string1); //reverses a string

//int result = strlen(string1); // returns string length as int
//int result = strcmp(string1, string2); // string compare all characters
//int result = strncmp(string1, string2, 1); // string compare n characters
//int result = strcmpi(string1, string1); // string compare all (ignore case)
//int result = strnicmp(string1, string1, 1); // string compare n characters (ignore case)

printf("%s", string1);

/*
if(result == 0)
{
printf("These strings are the same");
}
else
{
printf("These strings are not the same");
}
*/

return 0;
}

Tags and Topics

Browse our collection to discover more content in these categories.

Video Information

Views

129.1K

Likes

3.1K

Duration

5:03

Published

Oct 6, 2021

User Reviews

4.7
(25)
Rate:

Related Trending Topics

LIVE TRENDS

Related trending topics. Click any trend to explore more videos.

No specific trending topics match this video yet.

Explore All Trends