Total members 11895 |It is currently Sun Dec 22, 2024 9:45 am Login / Join Codemiles

Java

C/C++

PHP

C#

HTML

CSS

ASP

Javascript

JQuery

AJAX

XSD

Python

Matlab

R Scripts

Weka





Sizeof keyword usage in C++
cpp code
/*
* Print the sizeof information for the basic numeric types.
*/

#include <stdio.h>
main()
{
char c;
short s;
int i;
unsigned long l;
signed long long ll;

float f;
double d;
long double ld;

printf ("%d %d %d %d %d\n", (int)sizeof c, (int)sizeof s,
(int)sizeof i, (int)sizeof l, (int)sizeof ll);
printf ("%d %d %d\n", (int)sizeof f, (int)sizeof d, (int)sizeof ld);
printf ("%d %d %d\n", (int)sizeof(int), (int)sizeof(char),
(int)sizeof(long double));
}




_________________
Please recommend my post if you found it helpful


Author:
Beginner
User avatar Posts: 95
Have thanks: 2 time
Post new topic Reply to topic  [ 1 post ] 

  Related Posts  to : Sizeof Operator
 how to find size without using sizeof     -  
 operator int()     -  
 Using the ? Operator     -  
 What is the % operator     -  
 trinary operator     -  
 stream operator     -  
 What is Operator Overloading? !!!     -  
 operator overloading     -  
 Object without new Operator     -  
 Operator Precedence table     -  



Topic Tags

C++ Basics






Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
All copyrights reserved to codemiles.com 2007-2011
mileX v1.0 designed by codemiles team
Codemiles.com is a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for sites to earn advertising fees by advertising and linking to Amazon.com