God Morgen Pasiero
How are you?
Thank you always, to you, to visit month after month, this little corner of the Internet
This month we continue in the programming ...
talk about functions defined in C + +
"Are you ready?
There are many language features that provide us with scheduling ... uff .... If there ... since, for a print ...
Functions:
1. "court": This function is used to print Online whatever ... and when I say whatever ... I mean it has no restrictions on printing. Bookseller STREAM ... need is: # include this function is related to another ... is based on using printf and scanf. 2. "cin": This function is used to read a fact ... that's why I said it was like the printf and scanf. Use the library of the court itself and its format is: cin>> variable to read. " And logically assume that if we are reading a whole will not use this function, introducing another type of data. 3. 'strcpy': This feature lets you copy a string to a variable, string obviously ... but I wonder ... why do not assign a string to a string? ... It's NOT ok ... . Format: strcpy (string variable, "Value to assign ");... example: strcpy (h," See you "), obviously we have declared a string variable (if you forgot: char 4. 'strcat': This feature allows us to concatenate a string with another. When I say concatenate, I mean that binds him to one other value, it is that makes them one. Format: strcat ( 5. "strcmp": This feature allows us to compare two string variables and results of this comparison, a Boolean data (data type is 1 or 0). If the comparison indicates 0, not true, if given 1, it is true. Format: strcmp (( 6. "gets": This feature allows us to read only a string value. We are more efficient with respect to scanf. Format: gets ( This function has a sister ... 7. "puts" is almost the same as it gets, only this is for printing string's. Format: puts ( 8. 'strlen': I love this feature because with it I can know what is the size of a string entered. Do not think: if we declare a string of 10 characters, the size will be 10 characters ... what happens if the string entered is 10 characters ... can not say it is 10, when in fact it is not. So then this function. Format: strlen ( 9. "sizeof": This function is similar to strlen, but this gives the size in memory of the variable ... two very different things, with respect to strlen. Format: sizeof ( Well, that's all ... I think this can do many things ... is more ... by do not ... a simple algorithm: create an algorithm that prints on display, a string entered, but in reverse. That is, if I enter "Ivan", showing "NAVI". It is not difficult, with these functions you can do it quickly. I hope you enjoyed this ... thanks for visiting ... See you next month! Saellvertu og God Morgen!
0 comments:
Post a Comment