C_67 C Program to concatenate two strings | with strcat() and without strcat()

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

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

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
Рекомендации по теме
Комментарии
Автор

Jai sreeram mam the way you teach classes are super

ranapratapsingh
Автор

You are one of the best teacher i had ever seen ❤❤

ofpdplz
Автор

Very helpful. Way of teaching is awesome thank you soo much mam because of you only I am very much interested to learn c programming.

lakshmitirupatamma
Автор

Mam please make videos on java
Your teaching methodology is excellent

amitsh
Автор

Great job Maam...Thanks for your excellent way of teaching

bennetukoh
Автор

Your sweetness melts me 🥺❤️ Nice video mam keep growing ✨

smokey
Автор

thanks to god to giving this much of second option .that's second option is u mam.without attending to the classes of college getting an orsome marks by listening your lectures mam .

satyadevdevabathina
Автор

Thank you for the lecture. Well explained.

xiongbenjamin
Автор

I learn from this video.
That's what I just want to say ❤

urheartischild
Автор

😍😍😍😍😍. you one of the best teacher in my life

bipuldas
Автор

The strlen() function find only the number of characters in the given string. This one counts the characters only but not null(\0) character.

jayaprakashs
Автор

Mam you are a very good teacher mam your videos is very helpful for me thanks a lot mam 😊

manukumar-lqyy
Автор

10:29
The correct code of concatenate two strings using loop.
Strlen function doesn't include null Terminator so that's why used this addition line **s1[len1 + len2] = '\0';** to make the s1 a valid string.


#include <stdio.h>
#include <string.h>

int main() {
char s1[30] = "Bipasha";
char s2[5] = "Dutta";
int len1, len2, i;

len1 = strlen(s1);
len2 = strlen(s2);

for (i = 0; i < len2; i++) {
s1[len1 + i] = s2[i];
}

s1[len1 + len2] = '\0'; // Adding null terminator to the combined string

printf("%s", s1);

return 0;
}

Hope it helpsss!!

bipashadutta
Автор

Mam aap bachpan me kya khati jisse aapki awaz itni pyari si ho gyi 😁

sunnykvofm
Автор

Savi vedio dekh rehi Hu apka ...helpful hey bohut😊

bishalcreationstatus
Автор

Ur video are very helpful thank you so much mam

Srustigowdavlogs
Автор

Even if the size of destination string is less, with that for loop, it will still concatenate all source chars to it by overflowing the buffer allowed for destination.

I do think both strcat(d, s) and for loop will lead to the problem of buffer overflow.

So the best solution is, omitting size of destination to be determined by concatenation result.

Overall I liked your ways of teaching mom Jenny.👏

naolyag
Автор

I love you mam
I am now pro
Thank you❤️

bibekadhikari
Автор

thanks mam.
I am watching this before my exam

bhavyasachula
Автор

After watching whole lecture I think that math and chemistry is very easy

DeepakBhardwaj-ixvp
visit shbcf.ru