Mga halimbawa ng paggamit ng Getstring sa Ingles at ang kanilang mga pagsasalin sa Tagalog
{-}
-
Ecclesiastic
-
Colloquial
-
Computer
The call to getString?
Like getString, and storing.
Values of getInt and getString.
Oh, the getString, because it would.
Is the return value of getString.
GetString, of course, gets a string.
Top, s and t,and calling getString.
GetString, as we will see, literally.
Calls our own function, getString.
Oh, the getString, because it would be inputted into each[? area.?].
If this is the memory that's been returned by getString?
If I were to type in gabe again, a second time,when prompted with getString, where, of course, is gabe going to go? Well, presumably--.
It's declaring two variables up top, s and t,and calling getString.
Well, all this time, if we have been calling a function, like getString, and storing the so-called return value of getString in a variable-- it's called s type string-- we have been writing the line of code up there above.
So there's s on the left,and then getString on the right.
Let's just say, pictorially, let me just go ahead and propose that, if this is s,this is the return value of getString.
But it turns out, all this time,whenever you have called getString in so many of our programs, you're asking the operating system for memory, but you have any recollection of ever giving it back, doing unalloc, or free, as it's called.
And then there's t on the left,and then getString on the right.
If the string that the user typed in is way too long to fit into memory, orsome weird corner case like that, getString, as we will see, literally today, in its documentation, says it will return null as a special sentinel value, or just sort of a special symbol that means something went wrong.
So even though I have allocated a char star that's no longer called s, it's instead called,buffer-- so let's draw the variable's name now as buffer-- if I haven't called getString or malloc here, that effectively means that buffer is just some garbage value.