C_63 Strings in C-part 2 | Read a String using scanf and gets function

Sdílet
Vložit
  • čas přidán 27. 08. 2024
  • In this lecture we will discuss:
    - How to read a String using scanf and gets function?
    Best C Programming Tutorials: • Programming in C
    *********************************************
    Connect & Contact Me:
    Jenny's Lecture Hindi: / @jennyslectureshindi
    Facebook: / jennys-lectures-csit-n...
    Quora: www.quora.com/...
    Instagram: / jayantikhatrilamba
    Twitter: / khatrijenny
    Telegram Group Link: Jenny's Lectures
    telegram.me/je...
    *******************************************
    More Playlists:
    Programming in C Tutorials: • Programming in C
    C++ Tutorials for beginners: • Lec 1: How to Install ...
    Printing Pattern in C: • Printing Pattern Progr...
    Best Python Tutorials for Beginners: • Python - Basic to Advance
    Placement Series: • Placements Series
    Data Structures and Algorithms: https: • Data Structures and Al...
    Design and Analysis of Algorithms(DAA): • Design and Analysis of...
    Dynamic Programming: • Dynamic Programming
    Operating Systems tutorials: // • Operating Systems
    DBMS Tutorials: • DBMS (Database Managem...
    Tags:
    strings, string in c, what is string, c programming tutorials, c programming, best c programming tutorials
    #coding #strings #jennyslectures #cprogramming #clanguage

Komentáře • 484

  • @aparnamane4899
    @aparnamane4899 Před 2 lety +126

    string is not a data type in c but it is array of character in c and format specifier for string is %s.

  • @giteshzemse2087
    @giteshzemse2087 Před rokem +32

    I'm very fortunate i found your CZcams channel. You're a very scholar, talented woman. You tells so many good things to be a programmer. While you're a programmer, it's my dream to become one and your channel is a blessings for me.

  • @sarangbhasme4205
    @sarangbhasme4205 Před 2 lety +11

    when you're teaching one good thing is your face is smiley it makes us happy. and felt like that nothing is impossible in life. Thank You So Much.

  • @nikitachaurasia11
    @nikitachaurasia11 Před 3 lety +287

    Strings are not data type they are arrays of characters.

  • @techieadi4377
    @techieadi4377 Před 3 lety +10

    The C language doe
    s not provide an inbuilt data type for strings but it has an access specifier “%s” which can be used to directly print and read strings. You can see in the above program that string can also be read using a single scanf statement.

    • @itz__ahana_
      @itz__ahana_ Před 2 lety

      Bro pls help......
      Why we are not writing scanf("%s",&name)????
      Instead of scanf("%s",name)
      But in other programs we use &name
      Why we are not writing address of ....

    • @prithwihegde349
      @prithwihegde349 Před rokem

      @@itz__ahana_ because string is a internal pointer which is pointing to base address of zerothindex of array

    • @Logan-ig7sm
      @Logan-ig7sm Před rokem

      ​@@prithwihegde349but bhai array mai jo array name hota hai bo bhi to internal pointer hota hai uske pass bhi base address hota hai usme to use krna pdta hai &operator why?

  • @siddhianand3646
    @siddhianand3646 Před rokem +21

    No, string is not consider as a data type in C but it represents as a character array in C.

  • @Aptitude_guide
    @Aptitude_guide Před 3 lety +24

    omaagodd ,Your smiling face 😊and great way of teaching ☺️🤩

    • @kmanish2528
      @kmanish2528 Před 2 lety

      Really that smile in man's face is really 😍🥰

  • @talhashah3986
    @talhashah3986 Před 2 lety +23

    String is not a data type in C
    But string is a data type in C++

  • @JKA-sf7ll
    @JKA-sf7ll Před 3 lety +6

    constant string will be in code segment (compile time)
    modificable string will be in stack (runtime)

  • @benspencer7491
    @benspencer7491 Před rokem +19

    11:39 best moment of lecture

  • @funworld3530
    @funworld3530 Před 2 lety +6

    No, string is not a specific datatype in c like int , float , char , but string can be defined as a character array in c.

    • @itz__ahana_
      @itz__ahana_ Před 2 lety

      Bro pls help......
      Why we are not writing scanf("%s",&name)????
      Instead of scanf("%s",name)
      But in other programs we use &name
      Why we are not writing address of ....

  • @inside6703
    @inside6703 Před 2 lety +2

    Int main()
    {
    char name[20];
    printf("your name please") ;
    gets(name) ;
    Printf("hi :") ;
    puts(name) ;
    }

  • @Apshorts2123
    @Apshorts2123 Před 2 lety +9

    string is not a datatype in c but it is considered as an array of characters.
    It is a specific type of array whose datatype is always char.

  • @kwameanati
    @kwameanati Před rokem +3

    String is not a data type.

  • @sudhirchaudhary2936
    @sudhirchaudhary2936 Před 2 lety +4

    Mam you don't have to be uncomfortable in telling that your channel is the best channel.ofcourse your channel is the best channel..lots of love from Nepali students mam🇳🇵

  • @delllaptop519
    @delllaptop519 Před 2 lety +4

    11 : 40 That Smile Kill Me Alredy And Now I Am Waiting For Anthor Smile 😊

  • @ganeshghantasala2679
    @ganeshghantasala2679 Před rokem +1

    Your English is very clear to understand
    Thank you for your wonderful explanation

  • @vishalborate9608
    @vishalborate9608 Před rokem +2

    string is a character array, which is a known for a sequence of multiple characters ended by a special character null (\0) and its format specifier is %s

  • @thecoding_cat21
    @thecoding_cat21 Před rokem +1

    If you want to enter strings with spaces you can use "%[^
    ]" this format specifier instead of %s. It will allow you to enter strings with white spaces as input. Please inform me if I am wrong 🤔.

  • @NU_SudeepaPatnaikpakki
    @NU_SudeepaPatnaikpakki Před 3 lety +3

    Mam...we can print entire string along with space using scanf......please use this format...
    Scanf("%[^
    ]s",str);
    This statement reads the input until newline occurs....

  • @debojitacharjee
    @debojitacharjee Před 2 lety +4

    *FOR STRINGS WE SHOULD USE FOR LOOP TO AVOID THE BUFFER OVERFLOW* - initializing the array directly using scanf or gets is not a standard rule and are not for using with strings but only with characters using for loops

  • @mohdakramkhan4392
    @mohdakramkhan4392 Před 2 lety +7

    String is not a data type in c.It is 1 D array of character.

  • @keerthanas5634
    @keerthanas5634 Před rokem +1

    No string is not a datatype it is used in header files #include

  • @shuvamsahoo1130
    @shuvamsahoo1130 Před 3 lety +3

    I was also teaching students on coaching ❤👍but your presentation is more student friendly mam

  • @mq4950
    @mq4950 Před 3 lety +1

    I have subscribed your channel and I used to come to see your daily vedios as your smile and beauty is superb and lovingly❤💖💖💖💖

  • @rockstareditz4690
    @rockstareditz4690 Před 3 lety +16

    😂😂
    Ma'am , straight to the point
    99% come to see you nd 1% come to learn
    But the thing is everyone at the end of the day
    Ur classes make us learn more nd more , u r lectures , topics u teach nd everything is super
    I only wonder in how we started learning soo muchfrm u r class though it is not our purpose
    Thank u soo much for the valuable classes nd u can ask every btech student who got backlog in c , nd placement Preparation playlist is dope

  • @yashhokte1020
    @yashhokte1020 Před 2 lety +2

    String is not a data type we can considered string as the character arrays or it is an array of characters which is ended with the null character ('\0')..
    But the format specifier which is used to print the whole string is %s

  • @kanchupatihemanth8216
    @kanchupatihemanth8216 Před 2 lety +3

    Hi mam thank you for telling these class and your class are most useful for diploma 1st year students in Telangana and small request mam try to explain in telugu.

  • @mahendrab.k7278
    @mahendrab.k7278 Před rokem +1

    Mam your smile literally made me fall in love with you ❤❤❤.
    Love and support from Nepal 🇳🇵🇳🇵🇳🇵🇳🇵🇳🇵🇳🇵🇳🇵🇳🇵🇳🇵

  • @arsh2228
    @arsh2228 Před 2 lety +1

    mam u are such an inspiring personality

  • @babunaik371
    @babunaik371 Před rokem +2

    Good evening mam, strings are not a data type in c.

  • @prabhagupta2929
    @prabhagupta2929 Před rokem +1

    Mam I was learning c from any other creator but I switched to your lectures as those lectures was not explained in detail,
    Btw loving your way of teaching.

  • @hakimabahnu7722
    @hakimabahnu7722 Před rokem +1

    thank u soo much mam lots of love and respect from ladakh..😊🤗

  • @gayatriborade9556
    @gayatriborade9556 Před 2 lety +5

    string is not a datatype in c but it is a character array which ends with \0

  • @Vijayee
    @Vijayee Před 3 lety +3

    String is not data type, String is constant of character and enclosed character in double quotes

  • @erasamani2693
    @erasamani2693 Před 6 měsíci

    very good understanding seeing your videos more helpful

  • @VinjamRajesh-vu9px
    @VinjamRajesh-vu9px Před 7 měsíci +1

    string is not a data type in c but we can represent it with "char" data type is "%s".

  • @story-tamil
    @story-tamil Před rokem +2

    Very nice your explanation is 👌👌👌Thanks 😊

  • @user-nf6qd8ip9v
    @user-nf6qd8ip9v Před 8 měsíci +1

    No,string is not a datatype. But it is a character set of array

  • @nomuladivya3160
    @nomuladivya3160 Před 2 lety +1

    Stings are not datatypes they are array of characters and we explicitly declare it as char

  • @A.KSTUDIO755
    @A.KSTUDIO755 Před 10 měsíci +1

    No strings are not data types. It is array which is terminated by null character

  • @PranathiBendalam
    @PranathiBendalam Před 11 dny

    String is not a data type..but we can represent it as a character array.

  • @rohitmodi9169
    @rohitmodi9169 Před rokem +1

    It is not a data type ,it will only take the character values

  • @vivekgajara8418
    @vivekgajara8418 Před 3 lety +3

    Mam there is no data type for string. There is just a format specifier %s to print string

  • @THETHIRDEYEjoji
    @THETHIRDEYEjoji Před rokem +1

    Hello Madam I have a question; In vscode how do I set the cursor to move down to the terminal each time I tap the enter button and I need to input some values especially when using scanf or gets. I find it cumbersome to have to move the cursor down manually all the time.

  • @chandan-x3n
    @chandan-x3n Před měsícem

    string is not a data type. but it is a sequence of character terminated with null character.

  • @daughter_of_chitkute0611
    @daughter_of_chitkute0611 Před 9 měsíci +1

    No there is not such datatype called string in C so we use array of characters to represent it as a string.

  • @chaitralinaidu8019
    @chaitralinaidu8019 Před 2 lety +2

    NO String is not datatype but it is array of characters

  • @user-tq4ce7rq9u
    @user-tq4ce7rq9u Před 2 lety

    When you say right word on that time my heart was melting

  • @devanshshrimali2125
    @devanshshrimali2125 Před 2 lety +2

    No stings is a not a data type in C. It is a array of characters.

  • @akhilmittal3283
    @akhilmittal3283 Před 2 lety +2

    you are superb mam

  • @devSackey
    @devSackey Před rokem +1

    In c programming a string is not considered as a datatype but an array of characters (char)

  • @laxmikantbotkewar4191
    @laxmikantbotkewar4191 Před 2 lety

    we can use scanf( "%[^
    ]s" , name) it will fetch till new line character.

  • @Abhishek_GP
    @Abhishek_GP Před 6 měsíci +1

    no string is an array of character in c and terminated by the null character.

  • @b.jnanendravarma1636
    @b.jnanendravarma1636 Před 8 měsíci +1

    In C , string is a character of array but not a data type

  • @36-muhammedshahinp64
    @36-muhammedshahinp64 Před rokem

    your class is perfect. also your smile keep it your smail

  • @iAmAjayTeli
    @iAmAjayTeli Před 2 lety +3

    Mam you bring smile to our face
    You are a great teacher ❤️❤️❤️ with great smile on your face 😁😁
    Your teaching style is almostly differ from others

  • @shivendra3019
    @shivendra3019 Před 3 lety +2

    String is an array of characters in C but it is not an explicit datatype unlike in Java and other programming languages etc.

    • @nileshbhaskar9010
      @nileshbhaskar9010 Před 3 lety

      String is a class in java, not primitive data type

    • @shivendra3019
      @shivendra3019 Před 3 lety +1

      @@nileshbhaskar9010 It is a Class Type and not Wrapper as it does not have a parallel primitive type.

    • @nileshbhaskar9010
      @nileshbhaskar9010 Před 3 lety

      @@shivendra3019 no it's not

  • @jaga4123
    @jaga4123 Před rokem

    Mam you are the best programming teacher mam , love you mam❤❤❤

  • @obul231
    @obul231 Před 2 lety

    Your voice 🌹,smile 🌹 &teaching 🌹
    I'm ur fan 💖

  • @kuppalasindhuja7362
    @kuppalasindhuja7362 Před 10 měsíci +1

    String is not a datatyoe it is an array of character

  • @gowthamireddy8604
    @gowthamireddy8604 Před 8 měsíci

    U r super maam u r explaining like wow.....

  • @godsdomain.
    @godsdomain. Před 6 měsíci +1

    string is not a data type in c lang. it is an array of character in c

  • @christopheroche6103
    @christopheroche6103 Před 2 lety +1

    strings are collection of character, it is not a data type in C program.

  • @AsifRaza-tc8kt
    @AsifRaza-tc8kt Před 2 lety +2

    string is not a datatype in C. It is the character array in C

  • @rohanpatil1834
    @rohanpatil1834 Před 3 lety +1

    Dii thanku for your lectures and I really really adore you for that. Thanku Di.😄💯

  • @gio55964
    @gio55964 Před 3 lety

    mam, i am from Bangladesh.you are best teacher in youtube.

  • @arindamroy5681
    @arindamroy5681 Před 10 měsíci +1

    String is not a data types in c language but string is the character array

  • @Nikhilrao354
    @Nikhilrao354 Před 3 lety +2

    I am completed my 12 , when I search theorem of class 9 of my brother so I am find your vedio , and I am addicted your vedio 🤭

  • @amnakhanamnakhan8524
    @amnakhanamnakhan8524 Před rokem +1

    String is not date type it is the array of character..

  • @programmer1682
    @programmer1682 Před rokem +2

    String is not a data type it is character type.

  • @maheenfatima7566
    @maheenfatima7566 Před rokem +1

    string is an array of characters not a data type

  • @anesp.a913
    @anesp.a913 Před 2 lety +1

    I hope you are my teacher in 2003 boring classes of Engg college...

  • @LE-Anjali
    @LE-Anjali Před rokem +1

    No,string is not a data type in c.but it gives array of character.

  • @user-zs8rt8qo5n
    @user-zs8rt8qo5n Před 9 měsíci +1

    String is not a data type mam
    It is a character array

  • @PramodKumar-qz9ex
    @PramodKumar-qz9ex Před rokem

    I fall love with c mam💕💕

  • @user-lo5is4cv2l
    @user-lo5is4cv2l Před 8 měsíci +1

    No strings are not data types because "string":array of characters 😊😊

  • @princemaurya9823
    @princemaurya9823 Před 3 lety +1

    String is not a data type in c bt we can represent character array in c...

  • @shanthakumarshanthu3928
    @shanthakumarshanthu3928 Před rokem +1

    String is not a data type in c programming
    It is a collection of characters

  • @sachinghuge6194
    @sachinghuge6194 Před 2 lety

    just want to say "you are the best "

  • @srikaryenugula
    @srikaryenugula Před rokem +1

    Srikar diploma in ec is also watching your videos!

  • @aakashakshat4624
    @aakashakshat4624 Před 2 lety +1

    No strings are not datatype in C , it is a 1D array chracters.

  • @sunnyjaiswal7746
    @sunnyjaiswal7746 Před 2 lety +1

    NO, string is not a seprate datatype in C but it used as character datatype in C

  • @202_abhishek2
    @202_abhishek2 Před 2 lety +1

    no ,string is array of characters in c ,it always ends with null character.

  • @vikashvk5320
    @vikashvk5320 Před 2 lety

    Practiced all these commands before watching the video and ruined turbo c++
    Now it shows negative colour and blinks like tuni bulbs.finally reinstalled it.

  • @adedokunolaitan4376
    @adedokunolaitan4376 Před 2 lety +1

    string is not a datatype in C. Just an array of the datetype char

  • @vaddeharish7036
    @vaddeharish7036 Před 2 lety +1

    Stirng is a not data type it is a array of characters

  • @DheerajKumar-jv3ug
    @DheerajKumar-jv3ug Před 2 lety +1

    string is not a data types they are array of charactor

  • @z853c7
    @z853c7 Před 2 lety +1

    problem: both fgets and puts add a line-break after the input, so that you cannot output the %s in a continuous line of text. that only works with gets, but gets has the buffer problem.

  • @Tejash_Gohel
    @Tejash_Gohel Před 3 lety

    aapke lecture me apnapan feel hota he

  • @dhruvithakkar4278
    @dhruvithakkar4278 Před rokem +1

    no string is not a data type but mostly equal to character array.

  • @sumedhnagrale6997
    @sumedhnagrale6997 Před 2 lety +3

    Oficially, string is not a data type but we can make it data type by using "typedef".

  • @zubairbanaqib
    @zubairbanaqib Před 3 lety +1

    Thank you so much ma'am
    👍👍👍🙏🙏🙏

  • @indiancricketteam490
    @indiancricketteam490 Před 2 lety +1

    String is not data type it is charactor array in c

  • @narenderyadav5952
    @narenderyadav5952 Před rokem

    no, it will not allow to type beyond size in scanf & gets

  • @Shawaz11
    @Shawaz11 Před 3 lety

    Good evening mam and mam you are best mentor and you are a actor 🤗 very quit quit moments. In everytime. 🤗

  • @mailtoamith
    @mailtoamith Před 3 měsíci

    String is not a data type in c but it is array character in c language.

  • @yadavsnair
    @yadavsnair Před 3 lety +1

    500k loading 😍😍

  • @kirthi7606
    @kirthi7606 Před rokem +1

    string is not a data type,it is a character array in C.

  • @Dailydiaries23-u8o
    @Dailydiaries23-u8o Před rokem +2

    No strings are not data types