473,394 Members | 1,781 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

please explain me the size of int ,float.,char,double,and pointers in 16 and 32 bit

please explain me the size of int ,float.,char,double,and pointers in 16 and 32 bit
Jul 4 '10 #1
2 3742
@jeyshree
for 32 bit system
int 4 bytes
float 4 bytes
char 1 byte
double 8 bytes
short int 2 bytes
long int 4 bytes
Jul 4 '10 #2
Banfa
9,065 Expert Mod 8TB
The size of any variable or type is the number of bytes it takes in memory.

Apart from char, which always has a size of 1 by definition the size of all types is platform dependent.
Jul 4 '10 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

25
by: REH | last post by:
Someone more articulate than me please explain to Ioannis Vranos why the following two programs both exhibit undefined behavior: > #include <iostream> > #include <cstring> > > class SomeClass...
3
by: HP | last post by:
Hi All i was reading the source code of one file, and i find this declartion, can any one explain this for me please. int (*func(const char data))(int, float,char);
11
by: junky_fellow | last post by:
Do all double pointers have same size on a particular implementation. eg char **c_ptr; int **i_ptr; Is the size of c_ptr and i_ptr always same (on same implementation) or it may be different...
13
by: Michele Guidolin | last post by:
Hello to everybody. I'm doing some benchmark about a red black Gauss Seidel algorithm with 2 dimensional grid of different size and type, I have some strange result when I change the computation...
22
by: Jaspreet | last post by:
I was recently asked this question in an interview. Unfortunately I was not able to answer it and the interviewer made a decision on my C strengths (or weekness) based on this single question and...
8
by: Quinn Kirsch | last post by:
Hi all, the following c# example baffles me. my understanding of the managed code of visual .net is that all casts like this would be safe, but this example seems to contradict this notion. if...
5
by: guy | last post by:
Can someone point me to page that gives a decision tree on deciding when to use float or double in a C# application including performance impacts of using one over the other. And when is decimal...
6
by: Steve | last post by:
Hi, I've developed a testing application that stores formatted results in a database. Recently it was requested that I add the ability to generate graphs from the raw, un formatted test results...
116
by: Dilip | last post by:
Recently in our code, I ran into a situation where were stuffing a float inside a double. The precision was extended automatically because of that. To make a long story short, this caused...
1
by: nagarajan1960 | last post by:
Hi ! will you please explain the reasons main() { float a=1.1; double b=1.1; if(a==b) printf("I like you/n "); else printf("I hate you /n");
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.