Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and beauty - In C language, the transformation rule of four types of data, int long unsigned and char, is _ _ _ _ _.
In C language, the transformation rule of four types of data, int long unsigned and char, is _ _ _ _ _.

First of all, in C, operations between data must be of the same type before operations can be performed. If the types are inconsistent, you must first convert to the same type-from low level to high level.

in this question, the data type levels from low to high are char→int→unsigned→long. Convert from low level to high level during conversion.

for example, there are two numbers with data types: char and long. ? Char must be converted to long (because the level of long is higher than char) before operation. ?

but it can't be understood as: convert char into int first, then unsigned, and then long.

C language is a computer programming language, which has the characteristics of both high-level language and assembly language. It was introduced by D.M.Ritchie of Bell Institute in 1972. After 1978, C language has been transplanted to large, medium, small and microcomputer. It can be used as a working system design language to write system applications, or as an application design language to write applications independent of computer hardware. It has a wide range of applications and strong data processing ability, not only in software development, but also in all kinds of scientific research. It is suitable for compiling system software, three-dimensional, two-dimensional graphics and animation, and specific applications such as single chip microcomputer and embedded system development.

during the development, they also consider transplanting UNIX to other types of computers. The strong portability of C language is shown here. Neither machine language nor assembly language is portable, so the program developed for x86 cannot run on machines such as Alpha,SPARC and ARM. C language programs can be used on processors of any architecture, as long as the processors of that architecture have corresponding C language compilers and libraries, and then the C source code can be compiled and connected into the target binary file before running.