Home Answers Viewqa Java-Beginners datatypes in c++ and its sizes

 
 


Java Coder
datatypes in c++ and its sizes
1 Answer(s)      a year and 10 months ago
Posted in : Java Beginners

What is mean by datatypes in C++ and what is the sizes of different datatypes?

View Answers

July 25, 2011 at 2:56 PM


Data Types are used to identify what kind of data a variable is holding...such as if a variable is integer or char type? For example ..

a = 1; or a = "orange";

how will you recognize what type of value the variable "a" have ..at runtime?

That is the only reason we use datatypes like int, char, double etc..

List of DataTypes

char - 1byte
short int (short) - 2bytes
int - 4bytes
long int (long) - 4bytes
bool - 1byte (true or false)
float - 4bytes
double - 8bytes
long double - 8bytes
wchar_t - 2 or 4 bytes









Related Pages:
datatypes in c++ and its sizes
datatypes in c++ and its sizes   What is mean by datatypes in C++ and what is the sizes of different datatypes
C Array copy example
C Array copy example       In this section, you will learn how to copy an array in C. The example below contains two arrays: array1 and array2 with sizes 5 respectively. Here
c++
c++   Assume vector "x" of integers with values of 7, 3, 5, 8, 1, 9...) increments its control variable; 3.2) has a control variable named "i," with an initial of the value of variable "a"; 3.3) has a final value of its control
datatypes queries
datatypes queries  Respected sir ,what is the reason behind that java compiler gives me an error when float datatype isused to store float value?why we prefered double datatype for this?   You can use Scanner class
C Tutorials
C Tutorials       C Array copy example The example below contains two arrays: array1 and array2 with sizes 5 respectively. Here the size of an array
C and C++ books-page6
* as its parameter.      The Pointer to C++ Member... C and C++ books-page6       The Refactoring C++ Code  The two functions DOMString.transcode
C++Tutorials
from its basics up to the newest features of ANSI-C++, including basic concepts...; Installing Borland's 5.5 Compiler Borland offers its 5.5 compiler for C... C++ Tutorials       
Java for C Developers
-defined primitive type sizes In C, the size of short, int, and long types... Data types have well-defined sizes.    No pointers In C... Java for C Developers      
C++GraphicsTutorials
C++ Graphics Tutorials     ... in this document is correct. C/C++ Windows programmers who want to learn... MFC.      OpenIL in Dev-C++ OpenIL
C and C++ books-page2
retaining C's original features and its philosophy of "bare metal" performance... C and C++ books-page2       The Advice & Warning for C Tutorials  C and C
its urgent for me - Development process
its urgent for me  Hi All, this is kalavathi,i am new...: imconvert "C:\DOCUME~1\KALAVA~1.GUN\LOCALS~1\Temp\Alfresco\ImageMagickContentTransformer_init_source_32428.gif" "C:\DOCUME~1\KALAVA~1.GUN\LOCALS~1\Temp\Alfresco
ABUT A FUNCTION AND ITS USE - Java Beginners
ABUT A FUNCTION AND ITS USE  SIR CAN U PLEASE TELL ME ABOUT parseInt(args[i]) a)its use? b)when it is used? C)is it related to string class
C/C++ Programming Books
its predecessor, Visual C++ 5.0. The new features covered in this book follow... C/C++ Programming Books         Visual C++ 6 Unleashed
C++
C++  How can i write this in dev c
C++
C++  How can i write this in dev c
C interview questions
since each node "nPtr" is freed before its next address can be accessed. c...C interview questions  Plz answer the following questions..... TECHNICAL - C /question number 1/ Code: int z,x=5,y=-10,a=4,b=2
C interview questions
since each node "nPtr" is freed before its next address can be accessed. c...C interview questions  Plz answer the following questions..... TECHNICAL - C /question number 1/ Code: int z,x=5,y=-10,a=4,b=2
c++
c++  use a prgrm as an example to xplain-: a)class b)object c)message d)cope resolution operator
c++
c++  write a programme that calculates the area and circumference of a rectangle
c++
c++  i use turbo c++...i want to change the background color...what is the command for it and the header file used
c++
c++  i use turbo c++...i want to change the background color...what is the command for it and the header file used
c++
c++  i use turbo c++...i want to change the background color...what is the command for it and the header file used
C++
C++  dear sir How to create windows form application for login screen using C++? USER Name -TESTADMIN Password -testuser
c++
c++  differenciate btw.-a)local & public variables b)pre-defined & user defined functions c)fnctn prototype,defination & fnctn code.use code examples
c++
c++  differenciate btw.-a)local & public variables b)pre-defined & user defined functions c)fnctn prototype,defination & fnctn code.use code examples
C++
C++  differenciate btw.-a)local & public variables b)pre-defined & user defined functions c)fnctn prototype,defination & fnctn code.use code examples
c++
c++  write a prgrm tht accepts 3 integer values,then with a function to swap the values
C++
C++  Describe the principle advantages of deploying a linked list versus a static array when implementing a Queue or a Stack
C++
C++  I have been asked to write a programme that gets five values,gets the sum,average and product please help me
C#
C#  i need a code that will make program perform the basic operations upon the data Listview save, update and cancel
c++
c++  write a program that gets a key or character from the keyboard and displays it ASII code in decimal, hexadecimal and binary form.It must also give a description of the key pressed
c++
c++  write a prgrm tht calculates the surface area of a cylinder.the prgrm shld find the circumfrance and have a function that calculates the fadius and another to calculate the surface area
C++
C++  write a prgrm tht gets five values,gets the sum,average &...; #include <conio.h> void main() { clrscr(); int a,b,c,d,e,sum; float average...;>b>>c>>d>>e; sum=a+b+c+d+e; average=sum/5; product=a*b*c*d
c++
c++  .write a program that accepts 5 subjects of a student,it should have a function to calculate the average & another function to grade.grade should be as follows-<40=E,40-49=D,50-59=C,60-69=B & >70
c++
c++  Consider the following function: int funcExercise7(int list[], int size) { int sum = 0; for (int index = 0; index < size; index++) sum = sum + list[index]; return sum
c++
c++  Consider the following declarations: class xClass { public: void... private members does class xClass have? c. How many constructors does class xClass.... Write a C++ statement that prints the values of the data members of the object
C#
C# register form  i want to generate a user id automatically after filling their register form and i want to show their id to their email? please reply me soon
c++
c++  Consider the following declarations: class xClass { public: void func(); void print() const; xClass (); xClass (int, double); private: int u... private members does class xClass have? c. How many constructors does class xClass
C - Java Interview Questions
C  Void main() { int i=7; print f("%d",i++*++i); } Output:  Hi Friend, Output is 63. As you have set the value 7 to the variable i.The i++ increments the number after its use therefore it uses 7
c++
c++  Write a console based C++ program that reads student information from a text file, build an array of objects of type class StudentInfo... name with the minimum GPA 7) Display Student GPAs as Letter Grades (A, B, C, D
c++
c++  Characterize the following algorithm in terms of Big-O notation. for (int i = 1; i <= n; i++) for (int j = 1; j <= n; j++) for (int k = 1; k <= n; k++) cout << i + j + k
C++
C++  . Consider the definition of the following class: class CC { public: CC(); //Line 1 CC(int); //Line 2 CC(int, int); //Line 3 CC(double, int); //Line 4 . . . private: int u; double v
c++
c++  .write a prgrm tht accepts 5 subjects of a student,it shld hv a function to calculate the average & another function to grade.grade shld be as follows-<40=E,40-49=D,50-59=C,60-69=B & >70
c++
c++  Characterize the following algorithm in terms of Big-O notation. Also find the exact number of additions executed by the loop. (Assume that all variables are properly declared.) for (int i = 1; i <= n; i++) sum = sum + i
c++
c++  Write the definition of the class dayType that implements the day of the week in a program. The class dayType should store the day... on an object of type dayType: a. Set the day. b. Print the day. c. Return the day
C and C++ books-page4
than the sizes of each dimension.    The UNIX System call in c... C and C++ books-page4      ... An array in C is a region of memory in which the elements (chars, ints, etc.) can
according to me its ok but is calculating wrong values in
according to me its ok but is calculating wrong values in   program...; case 'C': decimal1 += 100...; break; case 'C': decimal2 += 100

Ask Questions?

If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.

Ask your questions, our development team will try to give answers to your questions.