Is complex number a data type in C language?

青灯夜游
Release: 2023-01-04 09:37:32
Original
3811 people have browsed it

Wrong, plural type is not a data type in C language. In C language, data types can be divided into four categories: basic data types, constructed data types, pointer types, and null types. Among them, basic types: character type, integer type, real type (single precision type and double precision type), enumeration type; constructed type: array, structure, public body.

Is complex number a data type in C language?

Related recommendations: C language video tutorial

The data types in the following options do not belong to the C language yes( ).

A. Plural type
B. Logical type
C. Double precision type
D. Collection type

Correct answer: A

Answer analysis:

In C language, data types can be divided into basic data There are four categories: types, constructed data types, pointer types, and null types. Among them, basic types: character type, integer type, real type (single precision type and double precision type), enumeration type; construction type: array, structure, public body. The logical type in option B and the double precision type in C are both basic data types, the collection type in option D is a constructed type, and the complex type in option A is not a data type in the C language.

Extended information:

Data type:

  • The data type can be understood as an alias for a fixed memory size.

  • Data type is the model for creating variables.

In C language, data types refer to an extensive system for declaring variables or functions of different types. The type of a variable determines how much space the variable storage occupies and how the stored bit pattern is interpreted.

Array types and structure types are collectively called aggregate types. The type of a function refers to the type of the function's return value.

Integer types:

The following table lists details about the storage size and value range of the standard integer types:

Type Storage size Value range
char 1 byte -128 to 127 or 0 to 255
unsigned char 1 byte 0 to 255
signed char 1 byte -128 to 127
int 2 or 4 bytes -32,768 to 32,767 or -2,147,483,648 to 2,147,483,647
unsigned int 2 or 4 bytes 0 to 65,535 or 0 to 4,294,967,295
short 2 bytes -32,768 to 32,767
unsigned short 2 bytes 0 to 65,535
long 4 bytes -2,147,483,648 to 2,147,483,647
unsigned long 4 Bytes 0 to 4,294,967,295
##For more programming related knowledge, please visit:

Programming Learning ! !

The above is the detailed content of Is complex number a data type in C language?. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!