Interview Questions Answers.ORG
Interviewer And Interviewee Guide
Interviews
Quizzes
Home
Quizzes
Interviews C Plus Plus Language Interviews:C++ Access ControlC++ COM ActiveXC++ ConstructorsC++ ContainersC++ Exception HandlingC++ FriendC++ InheritanceC++ Inline FunctionC++ New And DeleteC++ Operator OverloadingC++ Pointers & FunctionsC++ ProgrammerC++ ReferencesC++ Static DataC++ SyntaxC++ TemplateC++ Type CheckingC++ Virtual Functions
Copyright © 2018. All Rights Reserved
C++ Syntax Interview Question:
Explain what are the Sizes and ranges of the Basic C++ data types?
Submitted by: AdministratorFollowing table is with respect to a 16-bit word machine:
Type Bytes Range
char 1 -128 to 127
unsigned char 1 0 to 255
signed char 1 -128 to 127
int 2 -32768 to 32767
unsigned int 2 0 to 65535
signed int 2 2 -32768 to 32767
short int 2 2 -32768 to 32767
unsigned short int 2 0 to 65535
signed short int 2 -32768 to 32767
long int 4 4 -2147483648 to 2147483647
signed long int 4 -2147483648 to 2147483647
unsigned long int 4 0 to 4294967295
float 4 4 3.4E-38 to 3.4E+38
double 8 8 1.7E-308 to 1.7E+308
long double 10 3.4E-4932 to 1.1E+4932
Submitted by: Administrator
Type Bytes Range
char 1 -128 to 127
unsigned char 1 0 to 255
signed char 1 -128 to 127
int 2 -32768 to 32767
unsigned int 2 0 to 65535
signed int 2 2 -32768 to 32767
short int 2 2 -32768 to 32767
unsigned short int 2 0 to 65535
signed short int 2 -32768 to 32767
long int 4 4 -2147483648 to 2147483647
signed long int 4 -2147483648 to 2147483647
unsigned long int 4 0 to 4294967295
float 4 4 3.4E-38 to 3.4E+38
double 8 8 1.7E-308 to 1.7E+308
long double 10 3.4E-4932 to 1.1E+4932
Submitted by: Administrator
Copyright 2007-2024 by Interview Questions Answers .ORG All Rights Reserved.
https://InterviewQuestionsAnswers.ORG.
https://InterviewQuestionsAnswers.ORG.