top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

What is a Primitive data type?

+2 votes
743 views
What is a Primitive data type?
posted Jun 28, 2016 by anonymous

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

2 Answers

0 votes

They are : Boolean , byte , char , short , int , long , float and double

answer Jun 28, 2016 by Smriti
What is the definition, how can we call some datatype as primitive some as non-primitive.
Primitive data-type is a basic type is a data-type provided by a programming language as a basic building block
A variable of a non-primitive type doesn't contain the value directly; instead, it is a reference (similar to a pointer)
though this is my understanding, here is the helpful link
https://en.wikipedia.org/wiki/Primitive_data_type
cool, that makes it a complete answer. Thanks for supporting people and helping them.
thanks, always happy to help :)
0 votes

A primitive data type is either a data type that is built into a programming language, or one that could be characterized as a basic structure for building more sophisticated data types.
Examples of primitive data types include integers, floating point numbers and individual characters in text. Each of these primitive data types is an example of something that doesn’t require a large amount of data for representation.
1.Characters simply correspond to a single reference point in an ASCII chart.
2.Integers are numbers that do not need complex identifiers such as exponents and decimal points.
3. Boolean values require only a binary choice between two possible values.
and the classic primitive data types : (Wikipedia)
1.Character (character, char);
2.Integer (integer, int, short, long, byte) with a variety of precisions;
3.Floating-point number (float, double, real, double precision);
4.Fixed-point number (fixed) with a variety of precisions and a programmer-selected scale.
5.Boolean, logical values true and false.

answer Jun 30, 2016 by Shivam Kumar Pandey
Similar Questions
+1 vote

What type of conversion is not accepted in C and why?
a) char to int
b) float to char pointer
c) int to char
d) double to char

+4 votes

Say you are given a 2X2 board then number of squares are 5. Can someone help with the logic and sample program?

...