Pages

Wednesday 11 December 2019

Program to find any Datatype without sizeof operator

#include<stdio.h>
void main()
{
 int  x;
 printf("size of int is %ld",(char*)(&x+1)-(char*)(&x));
 printf("size of int is %ld",sizeof(x));
}

No comments:

Post a Comment

Constructors & Destructors in c++

  Constructors :  A Constructor is a special member function, which is used to initialize the objects of its class. The Constructor is invok...