Question

How do I find the size of the pointer datatype on my computer? I know how...

How do I find the size of the pointer datatype on my computer? I know how to get int, double, float, and char. But I have no clue how I would get this

Homework Answers

Answer #1

It depends upon different issues like Operating system, CPU architecture etc. Usually it depends upon the word size of underlying processor for example for a 32 bit computer the pointer size can be 4 bytes for a 64 bit computer the pointer size can be 8 bytes. So for a specific architecture pointer size will be fixed.Pointers generally have a fixed size, for ex. on a 32-bit executable they're usually 32-bit. There are some exceptions, like on old 16-bit windows when you had to distinguish between 32-bit pointers and 16-bit.. It's usually pretty safe to assume they're going to be uniform within a given executable on modern desktop OS's.

Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
Determine the size of an int variable, a double variable, and a pointer on your computer....
Determine the size of an int variable, a double variable, and a pointer on your computer. (a) Calculate the break-even point, as a function of n, beyond which the array-based list is more space efficient than the linked list for lists whose elements are of type int. (b) Calculate the break-even point, as a function of n, beyond which the array-based list is more space efficient than the linked list for lists whose elements are of type double.
Write a function that passes an array argument, getRandomNumbers, to get a pointer to an array...
Write a function that passes an array argument, getRandomNumbers, to get a pointer to an array of random numbers in the array. The function dynamically allocates an array, uses the system clock to seed the random number generator, populates the array with random values, and then returns a pointer to the array. Function getRandomNumbers to generate a random array and return a pointer. int* getRandomNumbers(int num); // The parameter indicates the number of numbers requested. The algorithm can be described...
Here is my java code, I keep getting this error and I do not know how...
Here is my java code, I keep getting this error and I do not know how to fix it: PigLatin.java:3: error: class Main is public, should be declared in a file named Main.java public class Main { ^ import java.io.*; public class Main { private static BufferedReader buf = new BufferedReader( new InputStreamReader(System.in)); public static void main(String[] args) throws IOException { String english = getString(); String translated = translate(english); System.out.println(translated); } private static String translate(String s) { String latin =...
How do I fix my error of binding on line 74? #include <iostream> #include <fstream> #include...
How do I fix my error of binding on line 74? #include <iostream> #include <fstream> #include <cctype> #include <cstring> #include <iomanip> using namespace std; #include "AvlTree.h" class WordCount { public:     char *word;     int *lines;     int count;     int size;     bool operator<(const WordCount &rhs) const {return strcmp(word, rhs.word) < 0;}     bool operator!= (const WordCount &rhs) const {return strcmp(word, rhs.word) != 0;}     WordCount():lines(NULL), count(0), size(0) {word = new char[1]; word[0] = '\0';}     friend ostream& operator<<...
How do I get this portion of my List Iterator code to work? This is a...
How do I get this portion of my List Iterator code to work? This is a portion of the code in the AddressBookApp that I need to work. Currently it stops at Person not found and if it makes it to the else it gives me this Exception in thread "main" java.lang.NullPointerException    at AddressBookApp.main(AddressBookApp.java:36) iter.reset(); Person findPerson = iter.findLastname("Duck"); if (findPerson == null) System.out.println("Person not found."); else findPerson.displayEntry(); findPerson = iter.findLastname("Duck"); if (findPerson == null) { System.out.println("Person not found.");...
how do i find yield of crude product obtained in the reaction? and how do i...
how do i find yield of crude product obtained in the reaction? and how do i find theoretical yield in grams and percent yield. let's say my grams after recrystallization is .769 grams . I converted acetanilide to p-bromoacetanilide. I have a recyrstallized p-bromoacteanilide after finsihing the experiement. I want to know this infomration for my 0.769 grams of p-bromoactenalidie that i have after finsihging the xperiment.
Javascript or jquery how can I get available memory size of the client computer?
Javascript or jquery how can I get available memory size of the client computer?
Programming Language: C How can I add each word in a sentence in to a 2d...
Programming Language: C How can I add each word in a sentence in to a 2d char array? Here's what I have so far: char *text; text = "This is my text"; char wordArray[500][500]; int textLength = strlen(text); --------------- Sample output: This is my text
I'm trying to find a code to check the occurrences of the word or string I...
I'm trying to find a code to check the occurrences of the word or string I wrote my own code but it's not working can you please help and fix my code #include <stdio.h> #include <string.h> #define MAX_SIZE 100 // Maximum string size int main() { char str[MAX_SIZE]; char tosearch[MAX_SIZE]; printf("Enter any string: "); gets(str); printf("Enter word to search occurrences: "); gets(tosearch); int cursor = 0; int i = 0; int stringLen = 0; int searchLen = 0; int count1;...
If I know my purchase price of stock and current price of this stock,how to calculate...
If I know my purchase price of stock and current price of this stock,how to calculate my capital gain per share currently,which data I need to find to support my calculation,
ADVERTISEMENT
Need Online Homework Help?

Get Answers For Free
Most questions answered within 1 hours.

Ask a Question
ADVERTISEMENT