2025 - .OnlineGuruji

.OnlineGuruji

Provides E-Notes,Video Tutorials And Download Links For Students In hindi

*********************************************************

*********************************************************
********************************************************************************

Breaking

Ramchandicollege Saraipali

Technology Jobs

OnlineGuru Blog मे आपका स्वागत है ब्लॉग से संबन्धित जानकारी के लिए संपर्क करें मो ॰ नम ।-9826026747(सपन कुमार दास) अपने विषय से संबन्धित अपडेट प्राप्त करने के लिए ब्लॉग पे दिये गए Bell Icon को press करें कम्प्युटर,Science,English Grammer से संबन्धित विषय की अधिक जानकारी के लिए हमारे ब्लॉग अथवा यू ट्यूब चैनल को सब्क्राइब करे ..

Friday, November 28, 2025

November 28, 2025

Call by Value & Call by Reference in C in Hindi

 

Call by Value & Call by Reference in C in Hindi

C प्रोग्रामिंग लैंग्वेज में, function को दो तरीकों से से call किया जा सकता है. पहला call by value और दूसरा call by reference.


Call By Value in C in Hindi

  • Call by Value मेथड में, actual parameters की value को फंक्शन के formal parameters में copy किया जाता है.

  • दूसरे शब्दों में कहें तो, “इसमें variable की value का प्रयोग function call में प्रयोग किया जाता है.”

  • Call by value मेथड में, हम formal parameters के द्वारा actual parameter की value को बदल नहीं सकते.

  • इसमें, actual और formal parameters अलग-अलग memory location में स्टोर रहते हैं.

  • actual parameter एक ऐसा argument है जिसे function call में प्रयोग किया जाता है जबकि formal parameter एक ऐसा argument है जिसे function definition में प्रयोग किया जाता है.

इसका Example –

इसका program नीचे दिया गया है:-

#include<stdio.h>
#include<conio.h>

void swap(int x, int y)
{
 int temp;
 temp = x;
 x = y;
 y = temp;
}

void main() 
{  
 int x = 50, y = 70;  
 clrscr();  
 swap(x, y);  // passing value to function
 printf("\nValue of x: %d",x);
 printf("\nValue of y: %d",y);
 getch();  
}  

इसका आउटपुट 

Value of x: 50
Value of y: 70

Call By Reference in C in Hindi

  • Call by reference में, एक argument के address को formal parameters में copy किया जाता है.

  • दूसरे शब्दों में कहें तो, “इसमें variable के address को actual parameter की तरह function call में pass किया जाता है.”

  • इसमें अगर हम formal parameter की value को change करते है तो actual parameter की value भी change हो जाएगी.

  • call by reference में, दोनों actual और formal parameters एक ही memory location में स्टोर रहते हैं.

इसका उदाहरण –

इसका program नीचे दिया गया है:-

#include<stdio.h>
#include<conio.h>

void swap(int *x, int *y)
{
 int temp;
 temp = *x;
 *x = *y;
 *y = temp;
}

void main() 
{  
 int x = 50, y = 70;  
 clrscr();  
 swap(&x, &y);  // passing value to function
 printf("\nValue of x: %d",x);
 printf("\nValue of y: %d",y);
 getch();  
}  

इसका आउटपुट –
Value of x: 70
Value of y: 50

Difference between Call by Value and Call by Reference in Hindi 

इनके मध्य अंतर निम्नलिखित हैं:-

Call By ValueCall By Reference
function को call करते समय, जब हम variable की value को pass करते हैं तो ऐसे functions को call by value कहते है.function को call करते समय, जब हम variable के address को pass करते हैं तो ऐसे functions को call by reference कहते हैं.
इसमें अगर हम variable की copy को change कर दे तो variable की original value नहीं बदलती.इसमें variable की value बदल दें तो function के बाहर variable की value भी बदल जाएगी
इसमें हम function call के द्वारा वास्तविक variable की value को बदल नहीं सकते.इसमें हम function call के द्वारा वास्तविक variable की वैल्यू को बदल सकते हैं.
इसमें variables की values को सरल तकनीक के द्वारा pass किया जाता है.इसमें variables के address को स्टोर करने के लिए pointer variable की आवश्यकता होती है.
इसमें actual और formal parameters दोनों अलग-अलग मैमोरी लोकेशन में store रहते है.इसमें actual और formal parameters एक ही मैमोरी लोकेशन में स्टोर रहते है.
इसे C++, PHP, Visual Basic NET, और C# के द्वारा support किया जाता है.इसे मुख्यतया Java के द्वारा support किया जाता है.


November 28, 2025

C String Functions

 


C String Functions

C लैंग्वेज में कई बिल्ट-इन फ़ंक्शन होते हैं जिनका इस्तेमाल स्ट्रिंग पर अलग-अलग ऑपरेशन और मैनिपुलेशन के लिए किया जा सकता है। ये स्ट्रिंग फ़ंक्शन स्ट्रिंग कॉपी, कंकैटनेशन, कम्पेरिजन, लेंथ वगैरह जैसे काम करना आसान बनाते हैं। <string.h> हेडर फ़ाइल में ये स्ट्रिंग फ़ंक्शन होते हैं।

1-strlen()

strlen() फ़ंक्शन का इस्तेमाल स्ट्रिंग की लेंथ पता करने के लिए किया जाता है। यह स्ट्रिंग में कैरेक्टर की संख्या बताता है, जिसमें नल टर्मिनेटर ('\0') शामिल नहीं है।

उदाहरण

#include <stdio.h>

#include <string.h>

#include <conio.h>

void main() {

    char s[] = "sapan          ";

   clrscr();

                // Finding and printing length of string s

    printf("%d", strlen(s));

getch();

}

S2-trcpy()

strcpy() फ़ंक्शन सोर्स से डेस्टिनेशन तक एक स्ट्रिंग कॉपी करता है. यह नल टर्मिनेटर सहित पूरी स्ट्रिंग कॉपी करता है.

 

उदाहरण:

#include <stdio.h>

#include <string.h>

#include <conio.h>

 

void main()

 {

   char src[] = "Hello";

    char dest[20];

   

    // Copies "Hello" to dest

    strcpy(dest, src); 

    printf("%s", dest);

   

getch();

}

3-strncpy()

strncpy() फ़ंक्शन strcpy() जैसा ही है, लेकिन यह सोर्स से डेस्टिनेशन स्ट्रिंग में ज़्यादा से ज़्यादा n बाइट्स कॉपी करता है। अगर सोर्स n से छोटा है, तो strncpy() डेस्टिनेशन में एक नल कैरेक्टर जोड़ता है ताकि यह पक्का हो सके कि n कैरेक्टर लिखे गए हैं।

 

उदाहरण:

#include <stdio.h>

#include <string.h>

#include <conio.h>

 

void main()

 {

   char src[] = "Hello";

    char dest[20];

   

    // Copies "Hello" to dest

    strncpy(dest, src, 4);

    printf("%s", dest);

getch();

}

4-strcat()

strcat() फ़ंक्शन का इस्तेमाल एक स्ट्रिंग को दूसरी स्ट्रिंग के आखिर में जोड़ने (जोड़ने) के लिए किया जाता है। यह सोर्स स्ट्रिंग को डेस्टिनेशन स्ट्रिंग में जोड़ता है, और डेस्टिनेशन के नल टर्मिनेटर को सोर्स स्ट्रिंग के कंटेंट से बदल देता है।

 

उदाहरण

#include <stdio.h>

#include <string.h>

#include <conio.h>

 

void main()

 {

    char s1[30] = "Sapan ";

    char s2[] = "Das";

    clrscr();

    // Appends "Geeks!" to "Hello, "

    strcat(s1, s2); 

    printf("%s", s1);

   

getch();

 

 

5-strncat()

C में, strcat() जैसा ही एक फ़ंक्शन strncat() होता है। यह फ़ंक्शन सोर्स से पॉइंट किए गए स्ट्रिंग से डेस्टिनेशन से पॉइंट किए गए स्ट्रिंग के आखिर में n से ज़्यादा कैरेक्टर नहीं जोड़ता है, साथ ही एक टर्मिनेटिंग NULL कैरेक्टर भी जोड़ता है।

 

उदाहरण:

#include <stdio.h>

#include <string.h>

 

int main() {

    char s1[30] = "Hello, ";

    char s2[] = "Geeks!";

   

    // Appends "Geeks!" to "Hello, "

    strncat(s1, s2, 4); 

    printf("%s", s1);

    return 0;

}

 

 

6-strcmp()

strcmp() C में एक बिल्ट-इन लाइब्रेरी फ़ंक्शन है। यह फ़ंक्शन दो स्ट्रिंग को आर्गुमेंट के तौर पर लेता है, इन दो स्ट्रिंग की तुलना लेक्सिकोग्राफ़िकली करता है और तुलना के नतीजे में एक इंटीजर वैल्यू देता है।

 

उदाहरण

#include <stdio.h>

#include <string.h>

#include <conio.h>

 

void main()

 {

     char s1[] = "Apple";

    char s2[] = "Applet";

    clrscr();

                // Compare two strings

                // and print result

    int res = strcmp(s1, s2);

    if (res < 0)

        printf("S1 is smaller than s2");

                else if (res > 0)

                printf("s1 greater than s2");

                else

                printf("both are same length " );

 

 

   

getch();

}

Saturday, March 15, 2025

March 15, 2025

बेसिक HTML tag

 


Basic tags in HTML.

Heading Tags

हेडिंग टैग का उपयोग headings of documents को परिभाषित करने के लिए किया जाता है। आप अपने headings के लिए अलग-अलग sizes का उपयोग कर सकते हैं। HTML में six levels of headings जो <h1>, <h2>, <h3>, <h4>, <h5> और <h6>  का उपयोग करते हैं।

Example:-

<!DOCTYPE html>

<html>

<head>

   <title>Heading Example</title>

</head>

<body>

   <h1>This is heading 1</h1>

   <h2>This is heading 2</h2>

   <h3>This is heading 3</h3>

   <h4>This is heading 4</h4>

   <h5>This is heading 5</h5>

   <h6>This is heading 6</h6>

</body>

</html>

Output:-

This is heading 1

This is heading 2

This is heading 3

This is heading 4

This is heading 5

This is heading 6

Paragraph Tag

<p> tag  का उपयोग  different different paragraphs के लिए किया जाता है . प्रत्येक  paragraph का  text  <p>के साथ openहोता है और   </p> tag के साथ close होता है .

 

Example

The following example demonstrates the use of paragraph (<p>) tag, here we are defining 3 paragraphs

<!DOCTYPE html>

<html>

<head>

   <title>Paragraph Example</title>

</head>

<body>

   <p>Here is a first paragraph of text.</p>

   <p>Here is a second paragraph of text.</p>

   <p>Here is a third paragraph of text.</p>

</body>

</html>

Output:-

Here is a first paragraph of text.

Here is a second paragraph of text.

Here is a third paragraph of text.

Line Break Tag

Whenever you use the <br /> element, anything following it starts from the next line. This tag is an example of an empty element, where you do not need opening and closing tags, as there is nothing to go in between them.

 

The <br /> tag has a space between the characters br and the forward slash /. If you omit this space, older browsers will have trouble rendering the line break, while if you miss the forward slash character and just use <br

Example

The following example demonstrates the use of break (<br />) tag

<!DOCTYPE html>

<html>

<head>

   <title>Line Break Example</title>

</head>

<body>

   <p>Hello<br /> You delivered your assignment on time.<br />

      Thanks<br /> Mahnaz</p>

</body>

</html>

Hello

You delivered your assignment on time.

Thanks

Mahnaz

Center Tag

The <center> tag aligns text, images, or other HTML elements in the middle of a web page.

 

Note: The <center> tag is deprecated in HTML5. You can use the CSS text-align property to center elements.

 

Example

The following example demonstrates the use of the <center> tag. Here, we are displaying the second paragraph in center alignment:

<!DOCTYPE html>

<html>

<head>

   <title>Centering Content Example</title>

</head>

<body>

   <p>This text is not in the center.</p>

   <center>

      <p>This text is in the center.</p>

   </center>

</body>

</html>

Output:-

This text is not in the center.

This text is in the center.

Horizonal Rule Tag

The horizontal rule (<hr>) tag displays a horizonal line. A horizontal line visually breaks up sections of a document. The <hr> tag creates a line from the current position in the document to the right margin and breaks the line accordingly.

 

Example

The following example draws a horizontal line between two paragraphs

<!DOCTYPE html>

<html>

<head>

   <title>Horizontal Line Example</title>

</head>

<body>

   <p>This is paragraph one and should be on top</p>

   <hr />

   <p>This is paragraph two and should be at bottom</p>

</body>

</html>

Output:-

 

This is paragraph one and should be on top

 

This is paragraph two and should be at bottom

Preserve Formatting Tag

The <pre> tag is used to preserve the formatting. Whenever you want to display content on the webpage exactly in the same format as it was written in the HTML document, you can use the <pre> tag. It preserves the formatting of source code, including line breaks and indentation.

 

Example

The following example demonstrates the use of the <pre> tag. Here, we are displaying some code that should keep the formatting exactly the same as it is written inside the <pre> tag

<!DOCTYPE html>

<html>

<head>

   <title>Preserve Formatting Example</title>

</head>

<body>

   <pre>

      function testFunction( strText ){

         alert (strText)

      }

   </pre>

</body>

</html>

Output:-

 

function testFunction( strText ){

         alert (strText)

      }

March 15, 2025

What is HTML?Basic HTML Structure:------

 


HTML एक मानक मार्कअप भाषा है, जिसका पूरा नाम हाइपर टेक्स्ट मार्कअप भाषा (Hyper Text Markup Language) है। यह वेबपेज बनाने के लिए व्यापक रूप से उपयोग की जाने वाली भाषा है। HTML का आविष्कार टिम बर्नर्स-ली (Tim Berners-Lee) ने 1991 के अंत में किया था, लेकिन इसका पहला संस्करण "HTML 1.0" वर्ष 1993 में जारी किया गया था। "HTML 2.0" पहला मानक HTML विनिर्देश (specification) था, जिसे 1995 में प्रकाशित किया गया था।

HTML क्या है?

HTML (HyperText Markup Language) एक मानक मार्कअप भाषा है, जिसका उपयोग वेबपेज की संरचना (structure) को डिज़ाइन करने के लिए किया जाता है। HTML दो शब्दों का संयोजन है: HyperText और Markup Language

  • HyperText वेबपेजों के बीच आंतरिक लिंक (internal links) को परिभाषित करता है।
  • Markup Language टेक्स्ट और मीडिया की लेआउट (layout) और प्रस्तुति (presentation) को परिभाषित करता है।

HTML की मूल संरचना

HTML दस्तावेज़ की बुनियादी संरचना में कुछ आवश्यक टैग होते हैं, जिनका उपयोग वेबपेज बनाने के लिए आवश्यक होता है। किसी भी प्रकार का HTML दस्तावेज़ बनाने के लिए इस संरचना का पालन करना अनिवार्य है।

<!DOCTYPE html>

<html>

<head>

   <title>Page title</title>

</head>

<body>

   <h1>Webpage's Heading</h1>

   <p>Content (Your first paragraph).</p>

</body>

</html>

Creating an HTML Document

HTML दस्तावेज़ एक फ़ाइल होती है जिसमें HTML कोड लिखा होता है और इसे ".htm" या ".html" एक्सटेंशन के साथ सहेजा जाता है। HTML दस्तावेज़ बनाने के लिए आपको एक टेक्स्ट एडिटर की आवश्यकता होती है, और इसे प्रदर्शित करने के लिए आपको एक वेब ब्राउज़र की जरूरत होती है।

HTML दस्तावेज़ बनाने के लिए निम्नलिखित चरणों का पालन करें –

  1. एक टेक्स्ट एडिटर खोलें (जैसे Notepad, VS Code)।
  2. HTML कोड लिखें
  3. फ़ाइल को ".htm" या ".html" एक्सटेंशन के साथ सहेजें

    Advantages of Learning HTML  HTML सीखने के कुछ प्रमुख लाभ निम्नलिखित हैं –

    Create a web site यदि आप HTML को अच्छी तरह से जानते हैं, तो आप एक नई वेबसाइट बना सकते हैं या पहले से मौजूद वेब टेम्पलेट को कस्टमाइज़ कर सकते हैं।

    Become a web designer यदि आप एक पेशेवर वेब डिज़ाइनर के रूप में करियर शुरू करना चाहते हैं, तो HTML और CSS सीखना अनिवार्य है।

    Understand web- यदि आप अपनी वेबसाइट को बेहतर प्रदर्शन और तेज़ लोडिंग स्पीड के लिए ऑप्टिमाइज़ करना चाहते हैं, तो HTML का ज्ञान बेहतरीन परिणाम प्राप्त करने में मदद करता है

    Learn other languages एक बार जब आप HTML की मूल बातें समझ लेते हैं, तो JavaScript, PHP, या Angular जैसी अन्य संबंधित तकनीकों को सीखना आसान हो जाता है।

    Applications of HTML                                                                                                जैसा कि पहले बताया गया है, HTML वेब पर सबसे अधिक उपयोग की जाने वाली भाषाओं में से एक है। इसके कुछ प्रमुख अनुप्रयोग निम्नलिखित हैं –

    वेबसाइट विकास (Website Development) – HTML का उपयोग वेबपेज (वेबसाइट) बनाने के लिए किया जाता है। लगभग हर वेबपेज में HTML टैग होते हैं, जो ब्राउज़र में उसकी जानकारी को प्रस्तुत करने में मदद करते हैं।

    इंटरनेट नेविगेशन (Internet Navigation) – HTML नेविगेशन टैग प्रदान करता है, जो एक पेज से दूसरे पेज पर जाने के लिए उपयोग किए जाते हैं। यह इंटरनेट ब्राउज़िंग का एक महत्वपूर्ण हिस्सा है।

    रेस्पॉन्सिव UI (Responsive UI) – आधुनिक HTML पेज मोबाइल, टैबलेट, डेस्कटॉप, और लैपटॉप जैसे सभी प्लेटफार्मों पर अच्छी तरह काम करते हैं, क्योंकि अब वे रेस्पॉन्सिव डिज़ाइन स्ट्रैटेजी का समर्थन करते हैं।

    ऑफ़लाइन समर्थन (Offline Support) – एक बार HTML पेज लोड हो जाने के बाद, उसे इंटरनेट कनेक्शन के बिना भी ऑफ़लाइन एक्सेस किया जा सकता है।

    गेम डेवलपमेंट (Game Development)HTML5 में मल्टीमीडिया और इंटरएक्टिव कंटेंट के लिए नेटिव सपोर्ट मौजूद है, जिससे यह गेम डेवलपमेंट के क्षेत्र में भी उपयोगी हो गया है।

    मोबाइल एप्लिकेशन डेवलपमेंट (Mobile Application Development)HTML, CSS3, और JavaScript की मदद से क्रॉस-प्लेटफ़ॉर्म मोबाइल एप्लिकेशन विकसित की जा सकती हैं।

    मल्टीमीडिया और वीडियो स्ट्रीमिंग (Multimedia & Video Streaming)HTML5 में वीडियो और ऑडियो तत्वों (elements) के लिए इनबिल्ट सपोर्ट होता है, जिससे वेब ब्राउज़र में सीधे मीडिया प्लेबैक संभव हो जाता है।                                                                                                                                    

    Basic HTML Structure

    HTML दस्तावेज़ की बुनियादी संरचना में कुछ आवश्यक टैग होते हैं, जिनका उपयोग किसी भी वेबपेज को बनाने के लिए अनिवार्य होता है। इस संरचना का पालन करना प्रत्येक HTML दस्तावेज़ के लिए आवश्यक है।

    <!DOCTYPE html>

    <html>

    <head>

       <title>Page title</title>

    </head>

    <body>

       <h1>Webpage's Heading</h1>

       <p>Content (Your first paragraph).</p>

    </body>

    </html>

     

     

    Elements of HTML Basic Structure

    The following are the basic tags that define the basic HTML structure

    1. <!DOCTYPE html>

    This element defines the document type as HTML. This element must be written before writing any HTML document.                                                                        यह तत्व दस्तावेज़ के प्रकार (Document Type) को HTML के रूप में परिभाषित करता है। इसे किसी भी HTML दस्तावेज़ को लिखने से पहले अनिवार्य रूप से लिखा जाना चाहिए

    2. <html>...</html>

    The <html> tag is the parent tag for all HTML elements. Everything related to create an HTML document must be written inside the <html> tag. CSS, JavaScript, and jQuery must also be written inside this tag.                                                              यह सभी HTML तत्वों का मूल (Parent) टैग है। HTML दस्तावेज़ बनाने से संबंधित संपूर्ण कोड इस टैग के अंदर लिखा जाता है। CSS, JavaScript और jQuery को भी इसी टैग के अंदर लिखा जाता है।

    3. <head>...</head>

    The <head> tag is a container tag for all those elements that are not directly displayed on the webpage but required for the page functionalities. It contains meta tags (which are used for SEO purposes), title tag, script tags, etc.                                          यह उन सभी तत्वों का कंटेनर टैग है, जो सीधे वेबपेज पर प्रदर्शित नहीं होते, लेकिन पेज की कार्यक्षमता (Functionality) के लिए आवश्यक होते हैं। इसमें मेटा टैग (SEO के लिए), टाइटल टैग, स्क्रिप्ट टैग आदि होते हैं।

    4. <title>...</title>

    The <title> tag is used to define the title of the webpage that you can see in the browser's tab, bookmarks list, and search engine results. This tag is also very important for SEO purposes to help search engine to understand the content of the webpage.                                                                                                                       यह टैग वेबपेज के शीर्षक (Title) को परिभाषित करता है, जिसे आप ब्राउज़र के टैब, बुकमार्क सूची और सर्च इंजन परिणामों में देख सकते हैं। यह SEO के लिए बहुत महत्वपूर्ण है, क्योंकि यह सर्च इंजन को वेबपेज की सामग्री समझने में मदद करता है

    5. <body>...<body>

    The <body> tag is the container tag for all those elements, which represents the main content of a webpage that displays on the browser.                                                                   यह उन सभी तत्वों का कंटेनर टैग है, जो वेबपेज की मुख्य सामग्री को प्रदर्शित करते हैं।

    6. <h1>...</h1>

    The <h1> tag is one of the heading tags. It is the most important heading tag, which defines the main title or headline of the webpage. Any text written inside <h1> and </h1> is a top-level heading of the content.                                                                                           यह शीर्षक (Heading) टैगों में से एक है। यह सबसे महत्वपूर्ण शीर्षक टैग होता है, जो वेबपेज के मुख्य शीर्षक या हेडलाइन को परिभाषित करता है। <h1> और </h1> के बीच लिखा गया टेक्स्ट सामग्री का शीर्ष स्तर (Top-Level Heading) होता है।

    7. <p>...</p>

    The <p> tag defines a paragraph, anything written inside <p> and </p> displays as a paragraph on the webpage. Use multiple <p> tags to display text in different paragraphs.                                                                                                                                                     ह टैग एक पैराग्राफ को परिभाषित करता है<p> और </p> के बीच लिखा गया कोई भी टेक्स्ट वेबपेज पर पैराग्राफ के रूप में प्रदर्शित होता हैअलग-अलग पैराग्राफ दिखाने के लिए कई <p> टैग का उपयोग करें।

    Writing Hello World in HTML

    By using the above basic HTML structure, we can write an HTML document to display "Hello World" on the webpage.

    <!DOCTYPE html>

    <html>

    <head>

       <title>Hello World Example by TutorialsPoint</title>

    </head>

    <body>

       <h1>Hello, World!</h1>

    </body>

    </html>

    </pre>       Output:-