answersLogoWhite

0


Best Answer

32 bits or 4 bytes and an int is not an address, it is a primitive so it directly access the data without a reference.

User Avatar

Wiki User

16y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: How many bytes in an address of an int variable?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

What is the function in java to find the size of given variable?

Dependion on the variable there are several methods to do it, this can only be applied to primitive types and arrays, for an array its the "name_of_array.length", for the arraylist this change just a little, it would be like "name_of_array_list.size()", for an int, double, float, long, byte, it would be like "name_of_variable.LENGTH" this is a public variable so you dont need a get, an finally for the String there is a method "name_of_string.length()" this would return the size of this String


What is the total size of memory allocated for structure variable?

Depend on the elements of you struct. Say i have struct a { int a, int b}. Total size is : 4 + 4 = 8 bytes.


How many bytes required for int float double char boolean?

Int: 4 bytes Float: 4 double: 8 char: 1 boolean: 1


How many bytes in a const int?

The storage size of an int in C is loosely defined, and may be either 2 bytes or, more commonly, 4 bytes. Whether or not it is defined as const won't affect the size.


C program to find address of variable?

// Use the & operator (Sometimes called the "address of" operator int variable = 7; printf("Address of variable = %d\n", &variable); printf("Value of variable = %d\n", variable);


What is the sizeof long int?

The sizeof long int is platform-dependent, often 4 bytes or 8 bytes.


What is the difference between pointer variable and simple variable What are the advantages of pointer variable?

normal variable stores a value of the given datatype where as the pointer variable stores the address of a variable. for example int n=10; int *p; p=&n; here p is a pointer variable and n is a normal variable.p stores the address of n where as n stores an integer value. *p prints the value of n,p prints the address of n.


How do you declared and initialized a pointer variable?

#include<iostream> int main() { int x=42; int* p=&x; // declare and initialise a pointer, assigning the address of x. }


Write a program in c plus plus that will convert an integer pointer into an integer and viceversa?

You cannot physically convert variables of one type to another type, you can only cast them to create a new type (a new variable), providing the new type is covariant with the existing type. int i = 100; // int variable int* p = &i; // pointer to int The indirect value of p is i (100) while the direct value of p is the address of i. And because p is a variable, it has an address of its own. Thus converting the pointer p to an int can be done in one of three ways: int j = *p; // assign indirect value of p to j (thus j==100). int k = (int) p; // cast the address stored in p and assign to k (k==address of i) int l = (int) &p; // cast the address of p and assign to l (l==address of p)


What is size of int value in c plus plus?

sizeof (int) will tell you (in bytes). It's often 2, 4 or 8 bytes.


Pointer is a variable holding a memory address?

pointer is a derived datatype which contains memory addresses as their values. program:- #include<stdio.h> #include<conio.h> void main() { int m=5,*p; clrscr(); p=&m; printf("address of variable m is %p",(void *)p); }


How many bytes are read in pointers by pointers dereferencing?

When you dereference a pointer you "read" the number of bytes determined by the pointer's type. That is, a char pointer dereferences a single byte while an int pointer dereferences 4 bytes (assuming a 32-bit int) -- regardless of the type actually stored at that address. However, note that a pointer can only actually point at a single byte since it only has storage for a single memory address. How many additional bytes are dereferenced is entirely dependant on the type of the pointer. To determine how many bytes are actually allocated to an address, use the sizeof operator, passing a dereferenced pointer (the pointer must point at the start of the allocation). If the pointer points at several elements of the same type (an array), then divide the total bytes by the size of the pointer's type to determine the number of elements in the array.