Strings in C, C++ | Interview question and answer +explanation | C C++ Programming tutorial

Publié le: 11 septembre 2022
sur la chaîne: Command Line
58
3

Strings in C are handled differently. It requires special attention to understand them. So String C interview questions are occupying a major percentage in technical interviews.

Reference:
To learn about text-section, please watch the video process memory segmentation -    • Process Address Space segmentation - Intro...  

00:53 - Topic introduction
01:45 - What is a string in C? and how strings are stored in memory?
02:34 - Interview question - 1
02:56 - Interview question - 2
03:11 - strlen, String library function
03:58 - Intreview question - 3
05:07 - Interview question - 4
06:41 - sizeof vs strlen
07:28 - Interview question - 5
08:13 - string pointers
08:28 - Interview question - 6
09:33 - string literal
09:39 - Interview question - 7
11:40 - String initialization with string literals
11:47 - Interview question - 8
12:05 - Conclusion

Strings in C and Strings in C++ are the same. And they are not basic data types. Strings in C and Strings in C++ are constructed as an array of characters. Because of this a character pointer also can be used for handling strings. Handling strings either as character arrays or character pointers requires a good understanding of the C programming fundamentals.

In this video, we've explored some important concepts behind strings in C and strings in C++. Also, we have some interview questions and answers for freshers as well as interview questions and answers for experienced candidates.

Topics covered: Strings in C, Strings in C++, strlen, and similar string library functions, How sting library functions in C are relying on the null termination byte, sizeof vs strlen, pointer to string in C, pointer to string in C++, string literal, string initialization in C by concatenating string literals.

More importantly, all these topics are explained with example programs that are basic for all string related coding questions in C++ and C.


Sur cette page du site, vous pouvez voir la vidéo en ligne Strings in C, C++ | Interview question and answer +explanation | C C++ Programming tutorial durée heure minute seconde en bonne qualité , qui a été Téléchargé par l'utilisateur Command Line 11 septembre 2022, Partagez le lien avec vos amis et connaissances, sur youtube cette vidéo a déjà été regardée 58 fois et il a aimé 3 téléspectateurs. Bon visionnage!