C_68 C program to Compare two Strings | with strcmp() and without strcmp() function

preview_player
Показать описание
In this lecture we will discuss a C program to compare two strings with strcmp() and without strcmp()

*********************************************

Connect & Contact Me:

Telegram Group Link: Jenny's Lectures
*******************************************

More Playlists:

Tags:
strings, string in c, what is string, c programming tutorials, c programming, best c programming tutorials

#coding #strings #jennyslectures #cprogramming #clanguage
Рекомендации по теме
Комментарии
Автор

Syntax of first line in Jenny's lecture: "In the series of programming in C we had discussed (most recent topic name), Thank you very much mam, even village people can understand your quality lectures which helps us to become a digital citizen. # Jenny's lectures for life.

shivendra
Автор

11:39 it will return a negative value since the ASCII value of 'e' is smaller than that of 'i'.

rickk
Автор

14:14 mam says :-"samajh rahe ho"
Was 🥰🥰💕
First time Hindi sune mam
Love from West Bengal, India ❣️❣️❣️

indrajitmandal
Автор

I couldn’t have done it without you ... So thanks ( from algeria ).

boukefmohamed
Автор

Thank you ma'am for this amazing explanation....got the concept of comparing two strings very nicely..✌🏻✌🏻

rickk
Автор

I'm transitioning to IT and I love your lessons, one of the few out there that I can really understand everything. Thank you for your great work, ma'am!

CarolErva
Автор

ma'am i had some doubt on string comparison. but after saw this video, i easily understand this topic. thank you ma'am.

codeanalysis
Автор

/*Compare two Strings*/
#include <stdio.h>
#include <string.h>
int main()
{
int value;
char s1[] = "Hello";
char s2[] = "Hey";
value = strcmp(s1, s2);
if (value == 0)
{
printf("Same");
}
else
{
printf("Not same");
}
printf("\n%d", value);

return 0;
}
output
Not same
-1

vishu
Автор

20:20 Using the condition with &&, if length of S1 < length of S2 and the first characters of S2 = S1, then the strings will be considered to be the same. Ex. S1 = "Me" and S2 = "Meat". The reason is that as soon as the Null character of S1 is encountered, the program will skip the loop, so the comparison with the remaining characters of S2 will not occur and the flag will never be changed to 1.

jeanrioux
Автор

Great Indian ppl have really conquered the programming world. respect!!

Gupatik
Автор

I am in love with your awesome explanation

KiranKumar-dbrs
Автор

I love your lesson. It is so helpful. I am subscribed to your channel now. Thank you

adetolasanni
Автор

20:28 No if we put && operator then it will never give correct output as the function of && operator is that if both the Condition is satisfied then only it will enter to its block but if in the second string if we found the null character in 2nd block only then it will not execute that block n so we can't use && operator :)

yashhokte
Автор

I think it gives 1 if the first non-matching letter in string is higher in first string, and -1 if the first non matching letter is smaller (obv in ASCII value)

limitess
Автор

Mam what it will give +ve or -ve when we give input as strl and strm

vickypatil
Автор

I'm getting error of "expected declaration or statement at the end of input"

Jyotiii
Автор

You are to intelligent and very helpful to us

dudduramasujith
Автор

maam i loveeee your teaching so much pls pls do DAA and OS after completeing C

subikshajegadish
Автор

Thanks a lot mam you have cleared my doubts regarding this string program.

Mohammadhaider-wdwp
Автор

Can we compare more than two strings also, how to do that?

archanakumarimeena