Đang chuẩn bị liên kết để tải về tài liệu:
C Programming for Scientists & Engineers phần 2

Đang chuẩn bị nút TẢI XUỐNG, xin hãy chờ

- Biểu tượng được gọi là địa chỉ của người điều khiển. Khi nó được đưa vào phía trước của một biến, nó được vị trí trong bộ nhớ mà biến đó được lưu trữ. Do đó, & A nên được đọc là "địa chỉ (trong bộ nhớ) của biến được gọi là A '. Nhà điều hành & cần thiết khi chúng ta sử dụng fscanf vì fscanf chỉ có thể đặt các dữ liệu | Variables data types and declaration statements 9 control string in this example is a formatting code that instructs fscanf to interpret the data that it reads from the keyboard as a character. The third argument A instructs fscanf to store the character that it has read in a variable called A. It is very important to note that the symbol has been used in front of the name of the variable. The symbol is called the address of operator. When it is put in front of a variable it gets the location in memory where the variable is stored. Hence A should be read as the address in memory of the variable called A . The operator is needed when we use fscanf because fscanf can only put the data that it reads into specific places in memory. More importantly fscanf needs to be told where to put the data that it reads. The easiest way to do this is to declare a variable beforehand and to say put the data at the address of that variable . The overall effect of this is to store the character supplied from the keyboard in the variable A. When fscanf has done its job the program then calls the fprintf function again. This time fprintf has to display a message on the screen that contains the contents or value of variable A. The message to be displayed is inside the control string which is the second argument. Inside the control string the formatting code c indicates where the value of 4 will be inserted into the message and that the value to be inserted is of type char. The conưol string also contains the symbols rì which together are a control code that forces the cursor to go to the start of the next line on the screen. The third argument specifies the variable A whose value is to replace c in the message. Tutorial 1.1 Implement Program 1.1. Write brief notes on the action of each statement in he program. Tutorial 1.2 Modify Program 1.1 to store the character data in a variable called character_data. 10 c programming for scientists and engineers 1.3 The integer data type Integer .