Copy a String into another String in C language | C programming video tutorials series
Vložit
- čas přidán 27. 08. 2024
- Find Here: Links of C language Video's Playlists
C Interview Questions & Answers
• 01 C++ Interview Quest...
for | while | do-while loops in c
• Use of for, while and ...
Functions in C
• 01 Function in C | How...
Graphics in C
• Graphics in C | How to...
1-D Array | 2-D Array | String | Pointer in C
• About 1-D Array and 2-...
Structure & Union in C
• C Programming - Read &...
String in C
• C Programming - Readin...
1-D Array in C
• Read 1-D Array and Pri...
2-Array in C
• Read 2 D array & print...
C Preprocessor
• How to create macro us...
File Handling in C
• How to write an intege...
Pointer in C
• What is Pointer | How ...
Dynamic Memory Allocation in C
• Pre defined function o...
Pattern Programs in C
• 01 Patterns in C | How...
Recursion in C
• 01 Recursion | How to ...
#cprogramming #ctutorials #clanguage
i go through all of your videos ....great learning experience
Many more to come. Also share with your friends too.
Thank you so much sir G🎉🎉🎉
Thank you sir!.. for making string learning easy
Thanks for appreciating. Keep learning and sharing.
Sir , your tutorials are best for beginners , especially to build logics , they are helping a lot . Thanks Sir
Thank you! Please share with others as well.
Really nice video❤️❤️❤️❤️
Thanks sir it helped a lot.
Tqq sir
When we enter the string through standard input , we dont enter any null character, then how it understands that it's a character array or string, if by default its adding null , and we want the characters that we entered to b treated as character array then what should we do so that null is not added by default ?
Sir, i have made this program in code blocks without adding null character mannually and it is working..it is automatically placed..but it is creating problem in turbo c where we are manually adding.
Can u paste the code that u have written?
Sure sir!!
#include
#include
void main()
{
char str1[20],str2[20];
int i;
printf("enter the string
");
gets(str1);
for(i=0;str1[i]!='\0';i++)
{
str2[i]=str1[i];
}
printf("string 2 is
");
for(i=0;str2[i]!='\0';i++)
{
printf("%c",str2[i]);
}
getch();
}
what if we do not write s[i][='/0'?????
It is used here to let loop know how many times to repeat. So in string at the end null is there so that's why we need to check loop condition for null.
@@SanjayGuptaTechSchool no.iam asking about s['/0'] at the end???
That is to assign null so that it can be treated as string.
Useless