C_63 Strings in C-part 2 | Read a String using scanf and gets function
Summary
TLDRThe video script is an in-depth discussion on strings in the C programming language. It covers the basics of what a string is, how to declare and initialize strings, and the importance of null characters. The script explains compile-time data, the use of functions like 'scanf' and 'gets', and their differences, emphasizing the risks of buffer overflow. It also demonstrates how to read a string using 'scanf' and the advantages of using both functions. The video aims to educate viewers on the correct practices to avoid common pitfalls when handling strings in C.
Takeaways
- 😀 The video discusses the basics of strings in the C programming language, including how to declare, initialize, and read strings.
- 📝 It explains that strings in C are arrays of characters and emphasizes the importance of the null terminator character at the end of a string.
- 💡 The video covers the use of the 'scanf' function to read strings from the user input, including the format specifier '%s'.
- 🔍 It demonstrates how to use the 'gets' function to read a string, but also mentions its deprecation due to security risks.
- 👍 The script highlights the difference between character arrays and strings, and the need to allocate memory for strings.
- 🚫 The video warns against buffer overflow, a common security vulnerability when dealing with strings and arrays.
- 🔑 It shows how to use the 'printf' function with '%s' to print strings, and the importance of handling memory correctly.
- 🔄 The script touches on the concept of memory allocation for strings and the potential risks of overwriting memory.
- 🛠️ It provides an example of how to enter a string using 'scanf' and 'gets' functions and the associated risks.
- 📚 The video mentions the importance of understanding computer memory when working with strings to avoid unsafe practices.
- ✅ Finally, it suggests that using 'fgets' is a safer alternative to 'gets' and hints at covering more about 'fgets' in a separate video.
Q & A
What is the main topic of the video script?
-The main topic of the video script is discussing strings in C programming, including how to declare, initialize, and read strings at runtime.
What is the difference between character array and string as mentioned in the script?
-The script explains that a character array is just an array of characters, while a string is a character array that is null-terminated, indicating the end of the string.
How does the script define a string in C?
-In the script, a string is defined as a character array that is null-terminated, which means it ends with a null character ('\0').
What is the purpose of the null character in a string?
-The null character ('\0') in a string serves as an indicator to signal the end of the string, which is important for functions that process strings.
What is the role of the 'scanf' function in reading strings as discussed in the script?
-The 'scanf' function is used to read strings at runtime. However, it's mentioned that 'scanf' should not be used with '%s' to read strings due to the risk of buffer overflow.
What is buffer overflow and why is it a concern in the script?
-Buffer overflow is a situation where more data is written to a block of memory, or buffer, than it can hold, which can lead to data corruption and security vulnerabilities. The script highlights this as a risk when using 'scanf' to read strings.
What alternative to 'scanf' is suggested in the script for reading strings?
-The script suggests using 'fgets' as an alternative to 'scanf' for reading strings, as it is safer and can prevent buffer overflow.
How does the script explain the use of 'fgets' to read strings?
-The script explains that 'fgets' can be used to read an entire line, including spaces, until a newline character is encountered, making it a safer choice for string input.
What is the significance of the 'gets' function mentioned in the script?
-The 'gets' function is mentioned as a deprecated function that was used to read strings. It is highlighted as unsafe due to its potential to cause buffer overflow and is no longer recommended for use.
How should one declare a string in C according to the script?
-The script suggests declaring a string in C by specifying the type as 'char' and initializing it with a set of characters enclosed in double quotes, followed by a null character at the end.
What is the importance of understanding memory allocation when working with strings in C?
-Understanding memory allocation is crucial when working with strings in C to avoid issues like buffer overflow and to ensure that the correct amount of memory is allocated for the string data.
Outlines
📘 Basics of C Strings
The script introduces the basics of strings in C programming, explaining how to declare, initialize, and manipulate them. It discusses the importance of null-terminated strings and the role of the '\0' character in C. The video also covers the use of functions like 'scanf' and 'gets' for reading strings, highlighting the risks of buffer overflow. The script emphasizes the need to understand memory allocation and the difference between character arrays and strings in C.
🔍 Reading and Storing Strings in C
This paragraph delves into the process of reading and storing strings in C. It explains how characters are automatically stored at the next position in memory and how pressing 'Enter' signifies the end of the string input. The script clarifies that the 'gets' function is unsafe due to buffer overflow risks and advises against its use. It also discusses the importance of specifying the address for each character entered and the concept of memory allocation for storing characters, including the maximum size limit.
🚫 Buffer Overflow and String Handling
The script addresses the dangers of buffer overflow when handling strings in C. It explains that writing beyond the allocated memory for a string can lead to program crashes or security vulnerabilities. The video emphasizes the importance of checking buffer sizes and the risks associated with using functions like 'gets'. It also discusses the use of 'scanf' with format specifiers as a safer alternative for reading strings and the importance of using the correct format specifiers to avoid overflow.
🛠 Best Practices for String Input in C
The final paragraph focuses on best practices for handling string input in C. It advises against using 'gets' due to its lack of buffer size control and recommends using 'fgets' instead. The script also discusses the importance of understanding the memory allocated for strings and the risks of buffer overflow. It suggests using fixed-size buffers and checking for buffer overflow to ensure program safety. The video concludes with a reminder of the importance of these concepts and hints at further discussion in future videos.
Mindmap
Keywords
💡Strings
💡Declaration
💡Initialization
💡Compile-time
💡Data Function
💡Character Array
💡Null Character
💡Overflow
💡scanf Function
💡Garbage Value
💡Memory Allocation
Highlights
Discussing strings in C++
Basics about strings, how to declare, initialize, and use them
Difference between character arrays and strings
Using the 'scanf' function to read strings
The importance of null characters in strings
Automatic memory allocation for strings by the compiler
How to read a string using 'scanf' function
Entering a string and storing it in memory
The concept of buffer overflow and its risks
Using 'fgets' function as an alternative to 'scanf'
Reading a string without considering white spaces
The role of memory allocation in string handling
Difference between 'scanf' and 'fgets' functions
Practical demonstration of reading strings in C++
Understanding the risks associated with buffer overflow
The importance of proper memory management when working with strings
Conclusion and summary of key points about strings in C++
Transcripts
सो इन द सीरीज ऑफ लर्निंग प्रोग्रामिंग इन
सी वी आर डिस्कसिंग स्ट्रिंग्स इन सी वी
हैव डिस्कस व्हाट बेसिक्स अबाउट स्ट्रिंग
लाइक व्हाट इज स्ट्रिंग हाउ टू डिक्लेयर अ
स्ट्रिंग हाउ टू इनिला इज अ स्ट्रिंग एट
कंपाइल टाइम दैट वी हैव डिस्कस इन
प्रीवियस वीडियो एंड सम इंपोर्टेंट पॉइंट
अबाउट स्ट्रिंग्स आल्सो सो वन क्वेश्चन
फॉर यू इ बिफोर स्टार्टिंग दिस वीडियो वन
क्वेश्चन इज यू हैव टू टेल मी इन कमेंट
बॉक्स इज स्ट्रिंग अ डेटा टाइप इन सी यस र
नो यू हैव टू टेल मी इन कमेंट बॉक्स राइट
नाउ लेट्स स्टार्ट विद द नेक्स्ट नो पार्ट
इन स्ट्रिंग्स इन सी इन दिस यू विल सी
व्हाट हाउ टू इनिश इइ अ स्ट्रिंग एट रन
टाइम और यू कैन से हाउ टू रीड अ स्ट्रिंग
सो यू कैन रीड और यू कैन इनिश इइ अ
स्ट्रिंग एट रन टाइम यूजिंग अ स्टैंडर्ड
फंक्शन व्हाट इज दैट फंक्शन स्कन एफ एज
वेल एज गेट एस टू फंक्शंस आर देयर स्कन एफ
एंड गेट एस गेट कैर इज आल्सो देयर बट
ओबवियसली गेट कैर कैन आल्सो रीड ओनली वन
कैरेक्टर सो वी हैव टू पुट दैट इनटू लूप
राइट सो वी विल डिस्कस दीज टू टू रीड अ
स्ट्रिंग एट रन टाइम और टू इ लाइ स्ट्रिंग
एट रन टाइम वी विल डिस्कस द ड्रॉ बैक्स ऑफ
बोथ द फंक्शन एज वेल एज सम एडवांटेजेस ऑफ
यूजिंग बोथ द फंक्शंस राइट फर्स्ट वी विल
डिस्कस हाउ टू रीड अ स्ट्रिंग यूजिंग
स्कैन अ फंक्शन राइट स्ट्रिंग इज व्हाट
इट्स नथिंग बट अ कैरेक्टर एरे व्हिच इज
एंडिंग विद नल कैरेक्टर राइट
सी आई होप द डिफरेंस इज क्लियर बिटवीन
कैरेक्टर एरे एंड स्ट्रिंग इफ आई डिक्लेयर
समथिंग लाइक दिस अ स्ट्रिंग लाइक कैर अ
स्ट्रिंग नेम इज s1 आई एम टेकिंग राइट एंड
हेयर द साइज इज
10 राइट एंड हेयर आई एम गोइंग टू स्टोर
जेनी दिस इज हाउ वी कैन इनिला इज अ
स्ट्रिंग एट कंपाइल टाइम य यूजिंग अ
स्ट्रिंग लीटल व्हाट एवर यू आर टिंग इन
डबल कोर्स दैट इज कंसीडर्ड एज अ स्ट्रिंग
ऑटोमेटिक कंपाइलर विल डू व्हाट हाउ टू
स्टोर दिस 10 बाइट शुड बी एलोकेटेड
हियर राइट सपोज मेमोरी इज फ्रॉम 1000
टू
1009 एंड दिस s1 इज द नेम ऑफ द स्ट्रिंग
एंड इट इज कंटेनिंग व्ट बेस एड्रेस और यू
कैन से द एड्रेस ऑफ द फर्स्ट बाइट ऑफ दिस
कैरेक्टर एरे दिस कंप्लीट इज व्हाट
कैरेक्टर एरे एंड हेयर आई एम गोइंग टू सो
व्ट जेई डब एंडवा दिस इज व्हाट अ स्ट्रिंग
सो कंपाइलर ऑटोमेटिक विल अपेंड विल य नो
पुट अ नल कैरेक्टर आफ्टर दिस स्ट्रिंग इट
मींस दिस कंप्लीट इज कैरेक्टर एरे हेयर वी
आर हैविंग सम गार्बेज वैल्यू बट इन दिस
कैरेक्टर एरे स्ट्रिंग इज व्हाट ओनली दिस
वन वंस कंपाइलर विल फाइंड दिस नल कैरेक्टर
मींस इट इज एंड ऑफ स्ट्रिंग एंड ऑफ
स्ट्रिंग राइट सो दिस इज व्ट स्ट्रिंग बट
या दिस इज कैरेक्टर एरे सो दैट इज डिफरेंस
स्ट्रिंग वड ऑलवेज बी एंडेड विद अ नल
कैरेक्टर अदर वाइज स्ट्रिंग इज जस्ट अ
कैरेक्टर एरे और यू कैन से इट्स एरे ऑफ
कैरेक्टर राइट सो आई होप यू नाउ गट द
डिफरेंस बिटवीन कैरेक्टर एरे और स्ट्रेन
यू कैन इफ एनी वन आस्क देन यू कैन टेल विद
सम एग्जांपल राइट नाउ राद देन
इनिशियर आई एम गोइंग टू रीड दिस यूजिंग
स्कैनर फंक्शन
राइट सो आई एम जस्ट राइटिंग फर्स्ट ऑफ ऑल
लाइक एंटर स्ट्रिंग दैट शुड बी प्रिंटेड
ऑन द कंसोल ऑन द आउटपुट स्क्रीन व्हेन यू
रन द प्रोग्राम एंड हाउ टू रीड यूजिंग
स्कैन एफ सो फॉर्मेट स्पेसिफाई अ स्ट्रिंग
इज परसेंटेज s
राइट एंड सिंपली हेयर यू हैव टू पास व्हाट
नेम ऑफ द स्ट्रिंग
s1
दैट्ची वी आर हैविंग सपोज इफ वी आर
एंटरिंग अ स्ट्रिंग समथिंग लाइक दिस सी
व्हेन यू आर गोइंग टू रन देन इट शुड
प्रिंट एंटर स्ट्रिंग एंड सपोज आई एम
एंटरिंग जेई ड एन वा जन सो हेयर आल्सो वी
आर हैविंग ट 3 4 फ फाइव कैरेक्टर्स यू हैव
टू प्रिंट फाइव कैरेक्टर्स राइट बट वी आर
नॉट यूजिंग एनी लूप अनदर डिफरेंस इज वी आर
नॉट यूजिंग एनी एड्रेस ऑफ ऑपरेटर हियर
राइट व्हाई एड्रेस ऑफ ऑपरेटर वी आर नॉट
प्रोवाइड हियर बिकॉज s1 इज व्हाट एंड इट
इज कंटेनिंग 1000 द बेस एड्रेस ऑफ़ दिस
कैरेक्टर एरे और यू कैन से द फर्स्ट
एड्रेस ऑफ़ दिस दिस वन सो इफ यू हैव
एंटर्ड जेनी सो जेनी वुड बी स्टोर्ड
समथिंग लाइक दिस जेई डल
एवा राइट
एंड आफ्टर कंप्लीट ंग दिस अनल कैरेक्टर
व्हिच शोज दैट हेयर इट इज़ एंडिंग ऑफ़ द
स्ट्रिंग एंड हेयर मे बी सम गार्बेज
वैल्यू आर देयर वी डोंट नो एनी एनी
गार्बेज वैल्यू इज देयर राइट सो दिस इज़
कैरेक्टर अरे दिस इज़ व्हाट स्ट्रिंग सो
नाउ व्हेन यू पास s1 मींस यू आर पासिंग
1000 दैट इज एड्रेस ऑफ द फर्स्ट वन एड्रेस
ऑफ़ द फर्स्ट बाइट द फर्स्ट लोकेशन सो जे
वुड बी स्टोर्ड हियर राइट एंड e वुड डेफ
बी ऑटोमेटिक स्टोर्ड एट द नेक्स्ट पोजीशन
देन ए देन ए देन वा एंड देन एट लास्ट
व्हेन यू प्रेस
एंटर देन व्हाट इट मींस एंड एंड ऑफ द
स्ट्रिंग मींस व्हेन यू हैव एंटर्ड व्हेन
यू प्रेस एंटर इट मींस इट विल यू नो स्टोर
नल कैरेक्टर एट द एंड इट विल शो एंड ऑफ द
स्ट्रिंग हियर राइट सो दैट इज वी आर नॉट
पासिंग एनी एड्रेस ऑफ ऑपरेटर बिकॉज वी आर
ओबवियसली पासिंग द एड्रेस ओनली बाय
राइटिंग दिस नेम एव राइट एंड वी आर नॉट
यूजिंग एनी फोर लूप वई सो बिकॉज हेयर वी
डोंट नीड टूू य नो
स्पेसिफाई द एड्रेस फॉर एवरी कैरेक्टर यू
आर एंटरिंग राइट सपोज यू आर टेकिंग एन एरे
इंट एरे ऑफ साइज फ और
10 मींस य आर राइटिंग व्ट एंटर 10
एलिमेंट्स ऑफ़ एन एरे वी नो एग्जैक्ट वी
हैव टू एंटर 10 एलिमेंट्स 10 एलिमेंट्स इन
एरे 10 इंटी जर इन दिस एरे सो एंड वी वर
पासिंग एड्रेस फॉर इंडिविजुअल इंटी जर्स
इन द एरे राइट मेमोरी लोकेशन फॉर ऑल द 10
इंटी जर्स इन फोर लूप बट हेयर इफ सपोज आई
एम आस्किंग एंटर ए स्ट्रिंग और एंटर नेम
बेसिकली वीी यूज़ अ स्ट्रिंग समथिंग लाइक
दिस आई हैव रिटन s1 बट बेसिकली वी यूज़
व्हाट टू एंटर सम नेम और दिस काइंड ऑफ़
थिंग सो कैर नेम 10 सो हेयर आई एम राइटिंग
एंटर नेम सो आई डोंट नो हाउ मेनी
कैरेक्टर्स आर देयर इन नेम इट्स नॉट लाइक
दैट आई विल स्पेसिफाई एंटर 10 कैरेक्टर्स
ऑफ योर नेम नो राइट वी डोंट नो हाउ मेनी
कैरेक्टर्स वीी आर गोइंग टू एंटर राइट सो
नाउ दिस दिस इज परसेंटेज दिस फॉर्मेट
स्पेसिफीज हैज बीन रिटन इन सच अ वे दैट वी
डोंट नीड टू पुट दिस स्कैनफ इन टू फोर लूप
एंड वी डोंट नीड टू पुट एनी लाइक एड्रेस
ऑफ ऑपरेटर यर दैट रीजन आई हैव ऑलरेडी
टोल्ड यू राइट नाउ हेयर आल्सो इट विल
प्रिंट एंटर
नेम राइट नाउ सी ओके ना इफ यू वांट टू
प्रिंट दिस स्ट्रिंग देन य सिंपली यूज
प्रिंट एफ परसेंटेज एस परसेंटेज एस इ वट
फॉर्मेट
नेम ट सो ट इट विल प्रिंट यर जई डबल
एनवास य कैन रीड यूजिंग स्कन फंक्शन बट ना
द ड्र बैक ऑफ
दिस इ आई वांट टू एंटर द नेम समथिंग लाइक
दिस इ आ एंटरिंग नेम यर
लाइक जयंती खत्री जयंती देन स्पेस एंड देन
खतरी सो ना व्हाट इट विल स्टोर यर एंड
सपोज साइज आई एम टेकिंग साइज शुड बी व्हाट
साइज शुड बी व्हाट नंबर ऑफ कैरेक्टर प्लस
वन प्लस वन इज फॉर नल कैरेक्टर सो हाउ
मेनी कैरेक्टर्स आर देयर 1 2 3 4 5 6 7 8
9 10 11 12 13 14 सो 14 कैरेक्टर्स
इंक्लूडिंग वाइट स्पेस प्लस वन इज फॉर नल
इट शुड बी 15 एटलीस्ट और आई एम टेकिंग
मैक्सिमम दैट इज 30 सो दैट यू कैन स्टोर
अप टू 30 कैरेक्टर्स राइट सो नाउ द आउटपुट
शुड बी जयंती खतरी बट द आउटपुट यू विल गेट
ओनली जंती इफ यू आर यूजिंग स्कैनफ टू रीड
दिस काइंड ऑफ थिंग व्हाई बिकॉज स्कैनफ विल
नॉट कंसीडर्ड वाइट स्पेस इन स्ट्रिंग सो
व्हेन यू एंटर देन हाउ इट वुड बी स्टोर्ड
हेयर इन दिस वन सपोज इट इज अप
टू 30 कैरेक्टर्स 30 ब्लॉक्स मींस द
लोकेशन वुड बी अप टू 1029 एंड 1000 इ
स्टोर यर सो इट विल स्टोर जे व्हेन यू
एंटर जे इट वुड बी स्टोर्ड हियर व्हेन यू
प्रेस लाइक ए समथिंग लाइक दिस जे देन इट
वुड बी स्टोर्ड हियर ए हेयर
वा देन ए ए टी एंड आई एंड नाउ बिफोर
राइटिंग खतरी आई एम आई एम प्रोवाइड अ
स्पेस स्पेस सो व्हेन यू प्रेस स्पेस देन
इट विल नॉट कंसीडर इट स्कैनफ विल नॉट
कंसीडर स्पेस इन स्ट्रिंग सो इट विल थिंक
दैट इट इज एंड ऑफ द स्ट्रिंग एंड कंपाइलर
विल ऑटोमेटिक पुट हियर नल कैरेक्टर सो
स्पेस खतरी सो इट इज नॉट गोइंग टू यू नो
स्टोर दिस खतरी हेयर हेयर इट शुड बी सम
गार्बेज वैल्यू एंड व्हेन यू विल प्रिंट इ
इट विल ओनली प्रिंट जयंती सी इट इज नॉट
प्रिंटिंग एनी गार्बेज
वैल्यू बिकॉज ओबवियसली नेम इज व्ट अ
कैरेक्टर एरे ऑफ 30 कैरेक्टर्स सो इट शुड
प्रिंट लाइक जयंती एंड रिमेनिंग कैरेक्टर
वुड बी सम अ व्ट
गार्बेज वैल्यू सो हेयर इट शुड बी सम
गार्बेज वैल्यू बट इट इज नॉट प्रिंटिंग
गार्बेज वैल्यू वी वांट द एग्जैक्ट आउटपुट
ओबवियसली वीी वांट द एग्जैक्ट नेम वी डोंट
वांट एनी गार्बेज वैल्यू दैट इज व्हाई
कंपाइलर विल ऑटोमेटिक वट पुट दिस नल
कैरेक्टर एट द एंड ऑफ द स्ट्रिंग सो व्हेन
एवर यू रीड दिस व्हेन यू आर प्रिंटिंग
परसेंटेज एस विद परसेंटेजेस दिस फॉर्मेट
स्पेसिफाइड इज रिटन समथिंग लाइक दिस इट इज
प्रोग्राम समथिंग लाइक दिस राइट
सो व्हेन एवर इट विल रीड टिल आई देन इट
विल रीड नल कैरेक्टर इट मींस एंड ऑफ
स्ट्रिंग इट विल नॉट प्रिंट एनीथिंग च इज
बियोंड
दिस नल कैरेक्टर राइट सो इट विल ओनली
प्रिंट जयंती यर सो दिस इज व्ट वन ड्र बैक
ऑफ स्कनर लाइक इफ आई वांट टू प्रिंट जयंती
खतरी लांबा और यू कैन से जनीज लेक्चर इज अ
यू नो इज बेस्ट चैनल फॉर सीएस एंड आईटी
स्टूडेंट सो इट विल नॉट प्रिंट द
प्रिंट ओनली द कैरेक्टर्स
अंट्स इट विल स्टोर टिल देन इफ यू राइट
जयंती एंड लाइक दिस खतरी विदाउट एनी वाइट
स्पेस इट्स ओके इट विल प्रिंट जयंती खतरी
यर राइट बट इ वाइट स्पेस देन इट विल नॉट
स्टोर सो दैट इज वन ड्र बैक ऑफ स्कन स्कन
फंक्शन आई होप यू गट इट टू ओवरकम दिस डॉ
बैक वी यूज गेटस
फंक्शन गेटस विल व्ट रेड द कंप्लीट लाइन
इंक्लूडिंग वाइट स्पेस
अंट्स अ न्यू लाइन और यू कैन से
एंटर राइट टिल देन इट विल रीड द कंप्लीट
लाइन सो इफ यू वांट टू रीड द कंप्लीट लाइन
देन यूज गेटस फंक्शन या देयर इज वन मोर
ड्रॉ बैक दैट इज बोथ फॉर स्कैनफ एंड गेटस
दैट वी विल डिस्कस आफ्टर आफ्टर डिस्कसिंग
गेटस सो आई होप यू गोट नाउ स्कैनफ फंक्शन
एंड इट्स ड्रॉबैक नाउ सी हाउ गेटस फंक्शन
वुड बी यूज्ड सेम वी डिक्लेयर अ स्ट्रिंग
एंटर नेम एंड हेयर राद देन स्कन एफ आई एम
यूजिंग
व्हाट गेट एस एंड हेयर यू जस्ट नीड टू पास
द नेम ऑफ द स्ट्रिंग हेयर नेम इज व्ट नेम
ओनली सो
दैट्ची नाउ सी व्हाट शुड बी द आउटपुट ऑफ़
दिस थिंग नाउ एंटर नेम एंड आई एम एंटरिंग
नेम लाइक समथिंग लाइक
दिस जयंती स्पेस खतरी स्पेस लांबा राइट
एंड नाउ एंड आफ्टर दैट आई एम प्रेसिंग
एंटर राइट सो इट विल स्टोर हेयर जयंती
स्पेस खतरी स्पेस लांबा एंड व्हेन एवर यू
प्रेस एंटर इट विल स्टॉप रीडिंग एंड
ऑटोमेटिक मींस एंड ऑफ स्ट्रिंग एंड एट द
लास्ट इट विल पुट व्हाट कंपाइलर विल पुट अ
नल कैरेक्टर एट द एंड राइट सो व्हेन वी
रीड इट विल प्रिंट जयंती स्पेस खतरी स्पेस
लाबा सो दैट इज हाउ यू कैन रीड अ एनटायर
लाइन विथ स्पेस एंड एवरीथिंग यूजिंग गेटस
फंक्शन राइट सो नाउ इट इज बेटर देन स्कन
एफ बट बट ड्रॉ बैक इज व्हाट सी फॉर बोथ
स्कैन एफ एंड गेट एस फंक्शन व्हाट इज द
ड्रॉ
बैक बफर ओवरफ्लो ो बैक नाउ व्हाट इज दिस
थिंग सी
हेयर इफ आई एम राइटिंग हियर नेम एंड आई एम
प्रोवाइड साइज फाइव ओनली
राइट इट
मींस फोर कैरेक्टर वी कैन स्टोर एंड वन इज
फॉर नल कैरेक्टर राइट सो नाउ वी आर
एंटरिंग अ नेम एंड हेयर आई एम एंटरिंग सेम
जयंती स्पेस खतरी स्पेस लाबा सो इट विल
ट्राई टू रीड इट विल ट्राई टू स्टोर द
एंटायस स्ट्रिंग
लद स्पेस ज लोकेटेड फॉर
ओनली टूथ फर 5 ओनली फाइ बाइट्स ओनली फॉर
फाइव कैरेक्टर्स एंड वन इज ओबवियसली फॉर
इट शुड बी नल सो यू नो अकॉर्डिंग टू द
लॉजिक व्ट एवर वी हैव स्टडीड इन स्ट्रिंग
ओनली जवाई शुड बी स्टोर्ड एंड लास्ट इट
शुड बी व्ट अ नल कैरेक्टर राइट बट हेयर इट
विल स्टोर द
र स्ट्रिंग यू कैन रन दिस प्रोग्राम सो
दिस इज व्हाट ओवरफ्लो इट इज नॉट गोइंग टू
चेक द बफर द बफर
साइज नाउ मेमोरीज एलोकेटेड ओनली फाइव
बाइट्स सो इट इज गोइंग टू स्टोर बियोंड
दिस मेमोरी
हियर सो व्हाट एवर इज देयर इन दिस मेमोरी
इट इज गोइंग टू ओवरराइट दैट थिंग सो दैट
इज वेरी रिस्की मे बी सम यू नो वेरी
इंपॉर्टेंट इंफॉर्मेशन और सम क्रिटिकल
प्रोग्राम इज रिटन दिस बियोंड दिस मेमोरी
वी डोंट नो अबाउट द कंप्यूटर मेमोरी
सो दैट इट इज गोइंग टू ओवरराइट इट इज
गोइंग ट इट विल ट्राई टू ओवरराइट दैट
प्रोग्राम एंड इट विल ट्राई टू स्टोर द
एनटायर स्ट्रिंग टिल यू एंटर अ न्यू लाइन
सो दैट वुड बी वेरी यू नो रिस्की टू यूज
इट्स नॉट सेफ इट्स वेरी
अनसेफ राइट सो दैट इज वई इट्स रिस्की टू
यूज गेटस राइट बिकॉज ऑफ द बफर ओवरफ्लो
कंडीशन सेम विद स्कैनफ स्कैनफ विल आल्सो
डू सेम थिंग इफ आई मॉडिफाई दिस प्रोग्राम
समथिंग लाइक
दिस रार देन गेट एस बेटर टू यूज एफ गेट ए
दैट आल्सो वी विल डिस्कस इन सेपरेट वीडियो
राइट इट इज बेटर टू यूज इट इज बेटर टू यूज
देन दिस गेटस एंड स्कन सो हेयर आई एम
राइटिंग स्कैन
एफ
एंड परसेंटेज
ए एंड आई एम गोइंग टू पास ओनली नेम यर
राइट एंड आई एम गोइंग टू प्रिंट ओके नेम
दिस आल्सो विल डू सेम थिंग
हेयर आई थिंक फोर कैरेक्टर श इट शुड टेक
एंड वन इज फॉर नल राइट एंड इफ आई राइट
हेयर जयंती सो द कैरेक्टर्स आर टूथ फर 5 6
सेन कैरेक्टर्स एंड वन आल्सो वन वुड बी नल
मींस एट राइट सो या इट विल ट्राई टू स्टोर
कंप्लीट दिस नेम जयंती एंड इट विल प्रिंट
जयंती बट ओनली द बफर साइज फॉर फाइ
कैरेक्टर्स सो इट इ आल्सो हैविंग द सेम
प्रॉब्लम ऑफ बफर ओवरफ्लो इट इट इ नॉट
गोइंग टू चेक द बफर साइज वाइल टेकिंग
इनपुट इट इ आल्सो गोइंग टू ओवरराइट इट इ
आल्सो गोइंग टू स्टोर दिस थिंग एंड बियोंड
दिस लोकेटेड मेमोरी आई होप यू आर गेटिंग
माय पॉइंट राइट इ इट कन्फ्यूजिंग नो राइट
ओके नाउ सी नाउ ओके इन स्न हैव वन थिंग
लाइक हेयर इफ आई राइट
परसेंटेज
4s नाउ इट मींस इट विल ओनली रीड फोर
कैरेक्टर्स यू आर सपोज एट द आउटपुट
स्क्रीन यू आर एंटरिंग एंटर नेम जयंती इट
विल स्टोर नाउ ओनली जे एवाई ए ओनली फोर
कैरेक्टर्स एंड आफ्टर दैट नल कैरेक्टर सो
दिस इज वन
अल्टरनेटिव बट यली यू हैव टू डू सम हार्ड
कोडिंग लाइक आई वांट टू एंटर ओनली
कैरेक्टर 15 कैरेक्टर समथिंग लाइक दिस दैट
इज नॉट अ गुड आई थिंक प्रैक्टिस सो राद
देन दिस वी कैन यूज एफ गेटस फंक्शन दैट वी
विल डिस्कस इन सेपरेट वीडियो सो आई होप यू
आर क्लियर विद स्कैनफ गेटस द एडवांटेजेस
एंड ड्र बैक्स एंड एवरीथिंग अबाउट दिस
थिंग यू कैन ट्राई योर ओन राइट इन द
नेक्स्ट वीडियो वी विल सी प्रिंट एफ एंड
पुट
एस टू प्रिंट अ स्ट्रिंग एंड देन वी विल
सी अ प्रोग्राम ऑन स्ट्रिंग्स एंड आई विल
शो यू प्रैक्टिकली ऑन माय लैपटॉप सोना
bye-bye
Weitere ähnliche Videos ansehen
C_64 Strings in C- part 3 | printf and puts function in C
C++ Strings | What is String? full Explanation
Strings | Lecture 12 | Java Placement Series
Python Tutorial for Beginners 2: Strings - Working with Textual Data
Go (Golang) Tutorial #3 - Variables, Strings & Numbers
C Programming (Important Questions Set 1)
5.0 / 5 (0 votes)