freepeople性欧美熟妇, 色戒完整版无删减158分钟hd, 无码精品国产vα在线观看DVD, 丰满少妇伦精品无码专区在线观看,艾栗栗与纹身男宾馆3p50分钟,国产AV片在线观看,黑人与美女高潮,18岁女RAPPERDISSSUBS,国产手机在机看影片

正文內(nèi)容

c語言基礎(chǔ)教程課件(英文版)ch(4)(已修改)

2025-01-24 07:57 本頁面
 

【正文】 A First Book of ANSI C Fourth Edition Chapter 3 Processing and Interactive Input A First Book of ANSI C, Fourth Edition 2 Objectives ? Assignment ? Mathematical Library Functions ? Interactive Input ? Formatted Output A First Book of ANSI C, Fourth Edition 3 Objectives (continued) ? Symbolic Constants ? Case Study: Interactive Input ? Common Programming and Compiler Errors A First Book of ANSI C, Fourth Edition 4 Assignment ? The general syntax for an assignment statement is variable = operand。 – The operand to the right of the assignment operator (=) can be a constant, a variable, or an expression ? The equal sign in C does not have the same meaning as an equal sign in algebra – length=25。 is read ―length is assigned the value 25‖ ? Subsequent assignment statements can be used to change the value assigned to a variable length = 。 length = 。 A First Book of ANSI C, Fourth Edition 5 Assignment (continued) ? The operand to the right of the equal sign in an assignment statement can be a variable or any valid C expression sum = 3 + 7。 product = .05 * 。 ? The value of the expression to the right of = is puted first and then the calculated value is stored in the variable to the left of = ? Variables used in the expression to the right of the = must be initialized if the result is to make sense ? amount + 1892 = 1000 + 10 * 5 is invalid! A First Book of ANSI C, Fourth Edition 6 Assignment (continued) If width was not initialized, the puter uses the value that happens to occupy that memory space previously (piler would probably issue a warning) A First Book of ANSI C, Fourth Edition 7 Assignment (continued) ? = has the lowest precedence of all the binary and unary arithmetic operators introduced in Section ? Multiple assignments are possible in the same statement a = b = c = 25。 ? All = operators have the same precedence ? Operator has righttoleft associativity c = 25。 b = c。 a = b。 A First Book of ANSI C, Fourth Edition 8 Implicit Type Conversions ? Data type conversions take place across assignment operators double result。 result = 4。 //integer 4 is converted to ? The automatic conversion across an assignment operator is called an implicit type conversion int answer。 answer = 。 // is converted to 2 – Here the implicit conversion is from a higher precision to a lower precision data type。 the piler will issue a warning A First Book of ANSI C, Fourth Edition 9 Explicit Type Conversions (Casts) ? The operator used to force the conversion of a value to another type is the cast operator (dataType) expression ? where dataType is the desired data type of the expression following the cast ? Example: – If sum is declared as double sum。, (int) sum is the integer value determined by truncating s
點擊復(fù)制文檔內(nèi)容
教學(xué)課件相關(guān)推薦
文庫吧 www.dybbs8.com
公安備案圖鄂ICP備17016276號-1