Saturday, April 4, 2020

C example learn to Use Gets() Function | c programs examples with output

 Learn To Use Gets() Function with example in c programming

 This Article From Learn c programming in Hindi Will help you to learn Use Gets() Function with example in c programming and check out "selection sort program in c", "socket programming in c", "merge sort program in c","Kruskal's algorithm in c", "for loop c programming", "c struct example","simple program in c language", "simple CPP program", "c programming practice questions", "c program using for loop", "programming using c", "hello world program in c", "if statement in c ".

 scanf() और gets () के बारे में कुछ महत्वपूर्ण बिंदु हैं:

  •     scanf() और gets () दोनों का उपयोग उपयोगकर्ता से इनपुट लेने के लिए किया जाता है।

  •      scanf() केवल तब तक इनपुट ले सकता है जब तक कि वह किसी स्थान का सामना नहीं करता। अंतरिक्ष के बाद के शब्दों को इसके द्वारा अनदेखा किया जाता है।

  •      gets () का उपयोग एक बार में एक इनपुट लेने के लिए किया जाता है, लेकिन इसे scanf() के विपरीत रिक्त स्थान के साथ एक पूरा वाक्य इनपुट करने के लिए उपयोग किया जा सकता है।

Use Below c programming practice questions gets ()

gets () एक बार में केवल एक ही लाइन लेता है यानी सभी शब्दों को Hiting से पहले \ n (Enter Key)।

c programs examples with output

#include

int main()
{
    printf("\n\n\t\tStudytonight - Best place to learn\n\n\n");

    char str[50];   // char array of size 50
    printf("Enter your complete name:\n\n\n");

    gets(str);
    printf("\n\nWelcome to Studytonight  %s\n\n\n", str);
    printf("\n\n\t\t\tCoding is Fun !\n\n\n");
    return 0;
}

Output

c programs examples with output
c programs examples with output


1 comment:

  1. Your Way Of Explanation was good. You add some valuable points. Here I am sharing some information about c-language. If you are new to programming then it is better to start with 'C'. Most of programmers take it as a fundamental for programming. It covers the all the basics of programming. You can utilize this knowledge in almost every language. After you learn how to program in C , you can easily switch to any other language. You need to understand how it works. For learning this you can prefer online tutorials or video tutorials or you can register in any good c language training in ameerpet.

    c language training in ameerpet

    ReplyDelete