Note: EOF The C programming language,

Reading <<The C programming luange>>,a pragram

 

#include <stdio.h>

main()
{
      int c;
      while((c=getchar())!=EOF)
      {
            putchar(c);
      }
}

 

1. EOF means end of file.

2 .Ctrl+z can end the loop.

3. EOF is an integer, so variable c must be int (char is not enough to hold EOF)

4. the value EOF is -1(VC6.0), but if you input -1,getchar() first get -,then second time get 1

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
C语言程序设计经典版本 英文版 Preface.................................................................................................................................... 6 Preface to the first edition........................................................................................................8 Chapter 1 - A Tutorial Introduction.........................................................................................9 1.1 Getting Started..............................................................................................................9 1.2 Variables and Arithmetic Expressions..........................................................................11 1.3 The for statement.........................................................................................................15 1.4 Symbolic Constants......................................................................................................17 1.5 Character Input and Output.........................................................................................17 1.5.1 File Copying..........................................................................................................18 1.5.2 Character Counting...............................................................................................19 1.5.3 Line Counting.......................................................................................................20 1.5.4 Word Counting.....................................................................................................21 1.6 Arrays..........................................................................................................................23 1.7 Functions.....................................................................................................................25 1.8 Arguments - Call by Value...........................................................................................28 1.9 Character Arrays..........................................................................................................29 1.10 External Variables and Scope.....................................................................................31 Chapter 2 - Types, Operators and Expressions.......................................................................35 2.1 Variable Names............................................................................................................35 2.2 Data Types and Sizes...................................................................................................35 2.3 Constants.....................................................................................................................36 2.4 Declarations.................................................................................................................38 2.5 Arithmetic Operators...................................................................................................39 2.6 Relational and Logical Operators.................................................................................39 2.7 Type Conversions........................................................................................................40 2.8 Increment and Decrement Operators............................................................................43 2.9 Bitwise Operators........................................................................................................45 2.10 Assignment Operators and Expressions......................................................................46 2.11 Conditional Expressions.............................................................................................47 2.12 Precedence and Order of Evaluation..........................................................................48 Chapter 3 - Control Flow.......................................................................................................50 3.1 Statements and Blocks.................................................................................................50 3.2 If-Else..........................................................................................................................50 3.3 Else-If..........................................................................................................................51 3.4 Switch..........................................................................................................................52 3.5 Loops - While and For.................................................................................................53 3.6 Loops - Do-While........................................................................................................56 3.7 Break and Continue.....................................................................................................57 3.8 Goto and labels............................................................................................................57 Chapter 4 - Functions and Program Structure........................................................................59 如下请下载查看
The C programming Language By Brian W. Kernighan and Dennis M. Ritchie. Published by Prentice-Hall in 1988 ISBN 0-13-110362-8 (paperback) ISBN 0-13-110370-9 目录结构: Contents Preface Preface to the first edition Introduction Chapter 1: A Tutorial Introduction Getting Started Variables and Arithmetic Expressions The for statement Symbolic Constants Character Input and Output File Copying Character Counting Line Counting Word Counting Arrays Functions Arguments - Call by Value Character Arrays External Variables and Scope Chapter 2: Types, Operators and Expressions Variable Names Data Types and Sizes Constants Declarations Arithmetic Operators Relational and Logical Operators Type Conversions Increment and Decrement Operators Bitwise Operators Assignment Operators and Expressions Conditional Expressions Precedence and Order of Evaluation Chapter 3: Control Flow Statements and Blocks If-Else Else-If Switch Loops - While and For Loops - Do-While Break and Continue Goto and labels Chapter 4: Functions and Program Structure Basics of Functions Functions Returning Non-integers External Variables Scope Rules Header Files Static Variables Register Variables Block Structure Initialization Recursion The C Preprocessor File Inclusion Macro Substitution Conditional Inclusion Chapter 5: Pointers and Arrays Pointers and Addresses Pointers and Function Arguments Pointers and Arrays Address Arithmetic Character Pointers and Functions Pointer Arrays; Pointers to Pointers Multi-dimensional Arrays Initialization of Pointer Arrays Pointers vs. Multi-dimensional Arrays Command-line Arguments Pointers to Functions Complicated Declarations Chapter 6: Structures Basics of Structures Structures and Functions Arrays of Structures Pointers to Structures Self-referential Structures Table Lookup Typedef Unions Bit-fields Chapter 7: Input and Output Standard Input and Output Formatted Output - printf Variable-length Argument Lists Formatted Input - Scanf File Access Error Handling - Stderr and Exit Line Input and Output Miscellaneous Functions String Operations Character Class Testing and Conversion Ungetc Command Execution Storage Management Mathematical Functions Random Number generation Chapter 8: The UNIX System Interface File Descriptors Low Level I/O - Read and Write Open, Creat, Close, Unlink Random Access - Lseek Example - An implementation of Fopen and Getc Example - Listing Directories Example - A Storage Allocator Appendix A: Reference Manual Introduction Lexical Conventions Syntax Notation Meaning of Identifiers Objects and Lvalues Conversions Expressions Declarations Statements External Declarations Scope and Linkage Preprocessor Grammar Appendix B: Standard Library Input and Output: <stdio.h> File Operations Formatted Output Formatted Input Character Input and Output Functions Direct Input and Output Functions File Positioning Functions Error Functions Character Class Tests: <ctype.h> String Functions: <string.h> Mathematical Functions: <math.h> Utility Functions: <stdlib.h> Diagnostics: <assert.h> Variable Argument Lists: <stdarg.h> Non-local Jumps: <setjmp.h> Signals: <signal.h> Date and Time Functions: <time.h> Implementation-defined Limits: <limits.h> and <float.h> Appendix C: Summary of Changes
回答: 根据引用\[1\]的信息,出现"Unable to connect to the server: EOF"的错误可能是kubelet没有成功启动导致的。可以尝试重启kubelet来解决这个问题。如果重启kubelet后仍然无法启动,可以查看kubelet的日志,使用命令"journalctl -xefu kubelet"来查看详细的错误信息。根据引用\[2\]的建议,还可以检查终端配置文件是否正确设置了no_proxy环境变量,确保不会被覆盖导致部分设置不生效。此外,根据引用\[3\]提供的信息,如果你是通过API Server的形式访问dashboard,可以尝试使用"http://localhost:8001/api/v1/namespaces/kubernetes-dashboard/services/https:kubernetes-dashboard:/proxy/"这个地址来访问dashboard。 #### 引用[.reference_title] - *1* [Unable to connect to the server:EOF](https://blog.csdn.net/weixin_67784724/article/details/129755010)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^control_2,239^v3^insert_chatgpt"}} ] [.reference_item] - *2* [解决Docker Unable to connect to the server: EOF](https://blog.csdn.net/qq_41490274/article/details/124663897)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^control_2,239^v3^insert_chatgpt"}} ] [.reference_item] - *3* [k8s Unable to connect to the server: EOF 问题解决](https://blog.csdn.net/weixin_42710740/article/details/123097398)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^control_2,239^v3^insert_chatgpt"}} ] [.reference_item] [ .reference_list ]

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值