Pages

Showing posts with label Program to find any Datatype without sizeof operator. Show all posts
Showing posts with label Program to find any Datatype without sizeof operator. Show all posts

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));
}

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...