Function: Also gets the string.Difference:scanf encounters a space/carriage return/tab that the input ends,However, the space/carriage return/tab key will remain in the input buffer . It is common to use GetChar () to handle the funeral of scanf; If
First, gets () function detailedThe Get () function is used to read a string from a standard input device (keyboard) until the carriage return ends, but the carriage return does not belong to this string .The calling format is:
Gets (str);
Format: int fgetc (File * stream );
Indicates reading a character from the object pointed to by the file pointer stream.
The return value of this function is a byte read.. If EOF is returned at the end of the file.
The prototype is char *
It is a kind of accumulation that it is good for you to write a blog. Well, after thinking about Coding's long journey, isn't it too miserable to have no logs.First, write an example that has plagued me for a while.
Char * fgets (char * s, int N,
fopen (Open file)
Defining functions
FILE * fopen(const char * path,const char * mode);
Function description
Parameter The path string contains the file path and filename to open, and the parameter mode
Lesson NOTES: Strings stored in the C language (arrays and pointers) 1. Use a character array to store1 Char name[5] = {' J ', ' A ', ' C ', ' K '}; 2 char name[] = {' J ', ' A ', ' C ', ' K '}; 3 Char // only when the character array is directly
int getchar (void);The GetChar function is equivalent to GETC (stdin). Read one character from standard inputint getc (FILE *stream);Return value: The return value is usigned char but we treat it with the int typeis typically defined as a macro to
# Include # Include # Include String . H> # Define # Maxstrlen 255 // Maximum String Length Typedef Char Sstring [maxstrlen + 1 ]; // Sequential storage representation of String Length // Read n characters Int Main () {File * FP; Int N;
Fgets (buf, size, FP)It acts in the following manner:(1) returns when a newline or file end EOF is encountered.(2) Read by row.(3) The newline character '/n ' at the end of each line is also the line character.(4) for buf sizes of size, read only
smtp| program if ($EMAIL _inc) return;
$EMAIL _inc= "defined";
Define ("Smtpport", 25);
Class Pop3 {
var $subject; Message subject
var $from _email; Sender Address
var $from _name; Sender Name
var $to _email; Recipient address
var $to _name;
For more information about the Scoket code used by phpsmtp to send emails, see.
The code is as follows:
/** Php smtp mail Scoket class* ZhozPhpSmtpSendMail. php* Created on 2008/09/02 zhoz.com* @ Author zhoz* V 1.72 update 2008/09/26 zhoz.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.