answersLogoWhite

0

Primitive types are the data types provided by a programming language as basic building blocks. Primitive types are also known as built-in types or basic types.

Depending on the language and its implementation, primitive types may or may not have a one-to-one correspondence with objects in the computer's memory. However, one usually expects operations on primitive types to be the fastest language constructs there are. Integer addition, for example, can be performed as a single machine instruction

User Avatar

Wiki User

12y ago

What else can I help you with?

Continue Learning about Engineering

What is different between primitive date type and non primitive data type in c plus plus programming language?

A primitive data type is built into the language - int, char, long, etc. A non-primitive data type is am abstract data type that is built out of primitive data types - linked list, queue, stack, etc.


Why c plus plus called as paritial oop?

C++ is only partially OOP because it is a superset of C and, for the sake of backward compatibility, retains the concept of primitive data types (such as integrals like char and int) and pointer data types, which are all strictly non-object-oriented. In Java and C#, there is no concept of a primitive data type. Even integral types such as int are treated as objects and there is no concept of a pointer data type.


Is string arr a non primitive data type?

Depends on the context of the question you were asking from, there are 2 distinct answers: Yes and NO. In the narrowest definition, any array is NOT a primitive data type in C#. Hence a string array is NOT a primitive data type in that context. A string itself, however, is a primitive data type. Some developers would like to extend the definition of "primitives" into the arrays, collections, and Enumeration. Thus, in this context, an array of string IS a primitive data type.


What is primary data type in C?

The terms "primary data type" and "secondary data type" are not exactly correct when working in C. Instead, C has what are called "primitive data types" or, in some references, "basic types" - types which can be affected by arithmetic operators. Other data types include structs, arrays, and unions. Structs, arrays and unions cannot be affected as a whole by arithmetic operators, although the members within that are primitive data types can be. Pointers can technically be affected by arithmetic operators, particularly +, -, ++ and --, but because their values are expected to be used as addresses, they're not considered to be primitive in nature. There are three primitive data types in C: integers, real numbers and complex numbers. Integers have no decimal points and can be signed or unsigned, and real and complex numbers are signed and have decimal points. Boolean types are represented by integers, most commonly "int" under Posix-style systems. More information about primitive data types can be found in the related links below


What is non primitive data types in Java?

"Primitive" data types are integers (char, int, long), floats (float, double) and void. Void is never used for variables, but tells C that a function accepts and/or returns no arguments. "Non-primitive" data types include arrays, structs and classes. These utilize primitive data types and are called, in general, structured data types. Data types can become more complicated as you mix the structured data types. For instance, arrays, structs and classes can contain arrays, structs and classes, nested as deep as you wish. Depending upon who asks the question, a non-primitive data structure may be just a structured type (array, struct, class), or a structured type containing structured types.

Related Questions

What are different data type in c?

primitive non primitive


What is different between primitive date type and non primitive data type in c plus plus programming language?

A primitive data type is built into the language - int, char, long, etc. A non-primitive data type is am abstract data type that is built out of primitive data types - linked list, queue, stack, etc.


What do you mean by non primitive data structure in C programming?

What do you mean by searching in data structure in C.?


Why c plus plus called as paritial oop?

C++ is only partially OOP because it is a superset of C and, for the sake of backward compatibility, retains the concept of primitive data types (such as integrals like char and int) and pointer data types, which are all strictly non-object-oriented. In Java and C#, there is no concept of a primitive data type. Even integral types such as int are treated as objects and there is no concept of a pointer data type.


Why is class called non primitive in c plus plus?

Primitive refers to base types, like int and char. Classes are complex types, combining primitives with other classes or structures, and are therefore non-primitive.


Is string arr a non primitive data type?

Depends on the context of the question you were asking from, there are 2 distinct answers: Yes and NO. In the narrowest definition, any array is NOT a primitive data type in C#. Hence a string array is NOT a primitive data type in that context. A string itself, however, is a primitive data type. Some developers would like to extend the definition of "primitives" into the arrays, collections, and Enumeration. Thus, in this context, an array of string IS a primitive data type.


What is primary data type in C?

The terms "primary data type" and "secondary data type" are not exactly correct when working in C. Instead, C has what are called "primitive data types" or, in some references, "basic types" - types which can be affected by arithmetic operators. Other data types include structs, arrays, and unions. Structs, arrays and unions cannot be affected as a whole by arithmetic operators, although the members within that are primitive data types can be. Pointers can technically be affected by arithmetic operators, particularly +, -, ++ and --, but because their values are expected to be used as addresses, they're not considered to be primitive in nature. There are three primitive data types in C: integers, real numbers and complex numbers. Integers have no decimal points and can be signed or unsigned, and real and complex numbers are signed and have decimal points. Boolean types are represented by integers, most commonly "int" under Posix-style systems. More information about primitive data types can be found in the related links below


Why Boolean is not considered in C as primitive data type?

primitive data types are those which are independent and boolean expression is never independent it's existence always depends on some conditions or voltage signals


What is non primitive data types in Java?

"Primitive" data types are integers (char, int, long), floats (float, double) and void. Void is never used for variables, but tells C that a function accepts and/or returns no arguments. "Non-primitive" data types include arrays, structs and classes. These utilize primitive data types and are called, in general, structured data types. Data types can become more complicated as you mix the structured data types. For instance, arrays, structs and classes can contain arrays, structs and classes, nested as deep as you wish. Depending upon who asks the question, a non-primitive data structure may be just a structured type (array, struct, class), or a structured type containing structured types.


Which language is 100 percent pure object oriented language?

The languages C# and Ruby are notable for their pure object oriented design. You can even call instance functions on literals, such as 10.to_s (Ruby) or 10.ToString() (C#). Other object-oriented designs tend to treat primitives as non-objects, such as in Java, and are therefore not technically "100%" object-oriented.


Explain the basic datatypes in C?

C datatype can be categories into two part 1) Scalar data type 2) derived data type.. The scalar data type is also called basic data type they are int char float double long signed or unsigned are key word which effectively change the storing power of these data type. by default they are signed in nature..


What is the difference between class data type and basic type in c plus plus .How can someone know which one is class type and which one is basic type.?

Basic types (primitive data types) have no methods associated with them.