Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

write a program for size of a data type without using
sizeof() operator?

Answer Posted / neel patwa

//Nice way to find size of any data type...
#include<iostream.h>
void main(){

int *p=0;
p++;
cout<<"\nSize of int="<<(int)p;
}
Note:U can replace int by other datatpe,
to find size of any data type..

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Given below are three different ways to print the character for ASCII code 88. Which is the correct way1) char c = 88; cout << c << " ";2) cout.put(88);3) cout << char(88) << " "; a) 1 b) 2 c) 3 d) constant

1090


What is the process to generate random numbers in c programming language?

1110


How can you invoke another program from within a C program?

1033


What is array of structure in c programming?

1246


Which is better pointer or array?

985


What are the Advantages of using macro

1125


Can you explain what keyboard debouncing is, and where and why we us it? please give some examples

2153


What is a pragma?

1087


What is the difference between #include and #include 'file' ?

1011


What is pointer and structure in c?

1091


how many errors in c explain deply

2042


string reverse using recursion

2387


What does *p++ do? What does it point to?

1009


What do header files do?

1032


7-Given an index k, return the kth row of the Pascal's triangle. For example, when k = 3, the row is [1,3,3,1]. For reference look at the following standard pascal’s triangle.

2702