+ 1

//fgets(city,40,stdin); <--when we write the function (fgets) that time identifie,size of arry(strlen) & standard input.

That's written compulsory? I mean // fgets(city, 40, stdin); in this function CITY is a identifier, 40 is a size of arry (string lenght) & standard input (stdin)... This I have to write compulsory in my code ?

13th Nov 2020, 6:14 PM
SARVESH ASHOK DEVRUKHAKAR
SARVESH ASHOK DEVRUKHAKAR - avatar
6 ответов
+ 4
Yes, compulsorily. That's how fgets works. 40 is the maximum number of characters to be read, but yes you usually use the array length
13th Nov 2020, 6:20 PM
Davide
Davide - avatar
+ 4
You are welcome 🤗
13th Nov 2020, 6:23 PM
Davide
Davide - avatar
+ 4
Oh and just to be accurate: you need to specify a pointer to a FILE, but it doesn't have to be necessarily stdin.
13th Nov 2020, 6:26 PM
Davide
Davide - avatar
+ 4
#$ŪPĒŘŠ.Å.Đ. 🤣🤣🤣 even my English is bad
13th Nov 2020, 6:27 PM
Davide
Davide - avatar
+ 2
Ok. thanks. 😄✌💪💎
13th Nov 2020, 6:20 PM
SARVESH ASHOK DEVRUKHAKAR
SARVESH ASHOK DEVRUKHAKAR - avatar
+ 2
PhD dreaming at my bed .🤣🤣🤣🤣🤣🤣🤣👏🏻👏🏻👏🏻👏🏻
13th Nov 2020, 6:47 PM
SARVESH ASHOK DEVRUKHAKAR
SARVESH ASHOK DEVRUKHAKAR - avatar