C Foundation Consolidation

Source: Internet
Author: User

1 //See the value of EOF2 3#include <stdio.h>4#include <stdlib.h>5 intMainvoid)6 {7printf"the value of EOF is represented by a number:%d\n", EOF);8System"Pause"); 9 return 0;Ten}

1 //Verify the value of GetChar ()! = EOF2 3#include <stdio.h>4   5 intMainvoid)6 {7printf"Press a button, ctrl+d or CTRL + Z to represent eof\n");8printf"expression GetChar ()! = EOF has a value of%d\n", GetChar ()! =EOF);9System"Pause");Ten   return 0; One}

Results: Ctrl+d---> 1; Ctrl + Z---> 0
#include <stdio.h>intMainvoid){  //Note: It is recommended to use the standard escape character (\n,\t,\b,\ ", \ \ \"), and if nonstandard escape characters are used, the result will become unpredictable (such as the following \a,\f,\r,\v)printf"\\Audible or Visual alert. \a\n"); printf ("Form feed. \f\n"); printf ("This escape, \ r, moves the active position to the initial position of the current line.\n"); printf ("Vertical tab \v is tricky, as it behaviour is unspecified under certain conditions.\n"); return 0;}

#include <stdio.h>  int main (void) {  printf ("  The values of EOF are expressed in numbers as:%d\n", EOF); return 0 ;} Results:1

C Foundation Consolidation

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.