What is string in Hindi ? ( c language में स्ट्रिंग क्या है)

Hello  दोस्तों!  इस post  में हमने  string in hindi  बताया है.

तो चलिए शुरू करते हैं:-


       String{स्ट्रिंग}
   यह character का समूह या array है। जिसका आखरी index null (/0)होता है। string को define करने के लिए characters के जरिए array बनाया जाता है। 
String को इस तरह define करते हैं।

उदाहरण के लिए:- “hello computer” एक string है। और इसे मेमोरी में character के ASCII Codes का इस्तेमाल करके store किया जाता है। string को memory में ASCII कोडेड रूप का इस्तेमाल करके दिखाया जाता है

string example


String को input करने के लिए 
Scanf(“% s ” , & str);

String को input करने के लिए gets( ); का इस्तेमाल भी किया जा सकता है।
Ex:- gets ( “str”)

इसी प्रकार string का output भी puts ( );  के जरिए किया जा सकता है।
Ex:- puts ( c );

String में प्रयुक्त्त होने वाले function

( 1) strlen( ) – string length :- strlen () function  का इस्तेमाल एक दी गई string मैं Characters की संख्या या string की लंबाई पता करने के लिए किया जाता है। इसमे end – of- string Characters (null) को छोड़ दिया जाता है।
Syntex:- 
#include<stdio.h>
#include<string.h>
Void main ()
{
Char name 【25】;
Int nch; 
Printf (” n enter name”);
Gets(name);
Nch=  strlen (name);
Printf (” length of the string name= %d n” , nch);
}

(2) string concatenation { strcat ()}:- strcat ( )फंक्शन  दो string को जोड़ता है या साथ रखता है। और एक single string बनाता है। यह दो argument लेता है। जो Destination ओर Source string है Destination ओर Source string को जोड़ता है। और परिणामी string को Destination string में store किया जाता है।
Syntex:- 
#include<stdio.h>
#include<string.h>
main ()
{
Char s1[15] , s2 [15];
Printf (” n enter first name s1:”);
Gets(s1);
Printf (” n enter first name s1:”);
Gets(s1);
Printf (” n enter first name s1:”);
Gets(s1);
Printf (” n enter last name s2:”);
Gets(s2);
Strcat (s1, s2);
Puts (s1);
}

(3) string copy {strcpy ()} :- strcpy ()  फंक्शन एक string के कंटेंट्स(Contents) को दूसरी में copy करता है। 
Syntex:- 
#include<stdio.h>
#include<string.h>
main ()
{
Char str1 [15] , str2 [15];
Printf (” enter a string strl to be copied into str2:);
Gets(str1);
Strcpy ( str2 , str1);
Puts(str2);
}

(4) String comparison { strcmp ()} :- strcmp () function दो string को करैक्टर by करैक्टर कम्पेयर करता है। यह किन्हीं दो string को पैरामीटर्स के रूप में ऐक्सेप्ट करता है। और एक integer value को return करता है।
Ex:- 
Strcmp(s1 ,s2)
यदि s1<s2 :- यदि पहली string  दूसरी  से छोटी है तो यह ,तो -1रिटर्न करेगा।

यदि s1 >s2 :-  यदि पहली स्ट्रिंग दूसरी से बड़ी है तो यह 1 रिटर्न करेगा।

यदि s1 == s2 :- यदि दोनों string समान है।तो 0 रिटर्न करेगा।


Contents

Visit my You tube channel for Education , Technology category videos…

technicalboy

  &

अगर इंटरेस्टिंग और अमेजिंग फैक्ट्स को जानने में इंटरेस्ट है और अगर हां तो  Visit my You tube channel for amazing viodeos,  Education , Technology related Amazing Facts…

TECHNOBE


इसे भी देखे:

MS Word Tutorial in hindi :

Introduction  Of MS Word जाने हिंदी में

Microsoft Office Button क्या है?

How To Open Ms Word In Hindi

Quick Access Toolbar क्या है?

Title bar in MS Word क्या है? 


Note:-

ये पोस्ट आपको कैसी लगी आप कमेंट कर के बताईये ! अगर आपको कुछ पूछना या अपनी राय देनी  हो तो आप हमे कमेंट या ईमेल करके बता सकते है हम पूरी कोसिस करेंगे की आपका रिप्लाई जल्दी से जल्दी दे सखे ……….


इसे भी देखे:

Hello दोस्तों! नीचे दिए गए links पर click  करके आपको हम  इस पोस्ट में  (Computer Online Test) की Practice कराएंगे जिससे आप अपने  CCC, O level , कम्प्युटर GK की practice कर सकते है.

इस post के द्वारा आप  अपनी कम्प्युटर की  नॉलेज बड़ सकते है.

उसके साथ ही साथ आप अपने कई प्रकार के पेपरो की भी तैयरी  भी कर सकते है.

जैसे की CCC, O level , कम्प्युटर GK की practice कर सकते है,

 

 

3 thoughts on “What is string in Hindi ? ( c language में स्ट्रिंग क्या है)”

Leave a Comment