String Concatenate Without Using Library Function

preview_player
Показать описание
Here in this video i have explained about how to concatenate two strings without using the Library Functions..Enjoy!!
Рекомендации по теме
Комментарии
Автор

you explains very nicely, do something with background sound

vishwambharkale
Автор

well done
but i wish if the bgm is not there it will be the excellent class

sidh
Автор

I think the i++ in 1st for loop is not because we already increment the value of i in the for. I discovered that when i using the i++ again in the 1st for loop body, it gives a garbage value in the place of the 1st string in the output.

sanketmukherjee
Автор

Why we doing i++, j++ and how they re joined

damanjotsingh
Автор

Every thing is good but what the thing about the sound background

sumapathiraj
Автор

* Assignment 5*/
/*Q7. Write a program to perform String manipulations (without using built in
functions)
a. String copy
b. String concatenation
c. String compare
*/

//a. String copy

#include <stdio.h>
#include <stdlib.h>

int main(int argc, char *argv[])
{
char s1[50];
char s2[50];
char s3[100];

int i=0, j=0;

printf("Enter the s1 string:");
gets(s1);
printf("Enter the s2 string:");
gets(s2);
fflush(stdin);
for(i=0;s1[i]!='\0';i++)
{
s3[i]=s1[i];
}
for(j=0;s2[j]!='\0';j++)
{
s3[i++]=s2[j];
}
s3[i]='\0';
printf("the string s1;%s is concatenate with s2:%s is s3:%s\n ", s1, s2, s3);
fflush(stdout);

return (EXIT_SUCCESS);
}


please do correction sir.

eaglehunt
Автор

U explained really well. Thanx a lot. Do update all the programs, that will be really helpful.

debjanisarma
Автор

the output is only one character, two string is not concatenating. pls give me answer.

sachingoel
Автор

Sir,
was it necessary to increment i inside first for loop(after storing value of a[i] in c[i]).

misbahpathan
Автор

Incrementing I again in for loop(i part) is creating problem, remove it and the code will run perfectly

rajatprakash
Автор

sir there is error in this code is tnot running properly i m Entering Ayush in first String n Singh in second String the output is coming is A only

singh
Автор

can u plzz explain how how to find string is pallindrome or not without using strrev????

BhushanDhage
Автор

you are a very good teacher..
can u upload tutorials based on pattern programming...pls

vk
Автор

hey sir could u make a video on class 11 cbse structure data type array c++.normal once.not with scan f thingy only that cout cin return 0 header file if loop etc

v-yugito
Автор

instead of writting \o we can only write b[i] ...ascii value of null is 0...thats the reason

rounak
Автор

How to give space between hello and john after concatenate?

zerotoherocoder-
Автор

is it compulsory to add the null to the c[i] at the end?

varshuvarshit
Автор

how you can use i out of the scope of its your program gives lots of error in Dev c++

adityarajora
Автор

Hi finally i find error in my code, i think i must be necessary to initialize the variables first instead of declaration. Thanks you Karthik.

sachingoel
Автор

why we are using "i" in the second string??

tusharkumar
visit shbcf.ru