Total members 11889 |It is currently Thu Mar 28, 2024 12:21 pm 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     -  
 Object without new Operator     -  
 trinary operator     -  
 stream operator     -  
 What is Operator Overloading? !!!     -  
 operator overloading     -  
 shift operator in java     -  



Topic Tags

C++ Basics
cron





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