answersLogoWhite

0

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

User Avatar

Wiki User

14y ago

What else can I help you with?

Related Questions

What does c plus plus use call by value or call by reference?

When we call a function in C++ by passing the values as arguments, it is called call by value. e.g #include<iostream.h> #include<conio.h> int add(int,int); int main() { int a,b,c; cout<<"Enter numbers."; cin>>a>>b; c=add(a,b); cout<<"Sum : "<<c; return 0; } int add(int a,int b) { int c; c=a+b; return c; }


Store value in variable c plus plus?

#include<iostream> int main() { int var=42; // store the value 42 in a variable named var. return(0); }


C plus plus program using function min that take three parameters of type int and returns the minimum of the three?

int min (int a, int b, int c) {if (a


Which Program that will run in C but not in C plus plus?

void main() { int *x = malloc(sizeof(int) * 10); }


What will happen if a char is counted as an int in C plus plus?

The main difference is that int values are treated as being integers whereas char values are treated as being character codes. Thus if you output a char with value 65 you will get the symbol 'A', but if you output an int with the value 65 you will get the value 65 instead. In order to output the symbol 'A' you would have to cast the int to a char.


How do you round off a double value in c plus plus?

To round off to the nearest integer... double a = {some value}; a = (int) (a + 0.5); To round off to the nearest hundredth... double a = {some value}; a = (int) (a * 100. + 0.5) / 100.; These are just two examples.


What is the distinction between a type and an instance of that type in C plus plus?

An example may help: int x= 3; Here 'int' is a type, 'x' is a variable with the type, and '3' is a value of the type.


Write a c plus plus program to find largest among three number using control statement and ternary operators?

int max (int a, int b) { return a<b?b:a; } int max3 (int a, int b, int c) { return max (max (a, b), c); }


What is meant by void in c plus plus?

void is used by functions that do not return a value. For example: // This function returns an integer, which you can use in other functions int addTwoNumbers(int a, int b) { return(a + b); } // This function does not return a value, so we declare it as a void void printSum(int a, int b) { cout << a << " + " << b << " = " << addTwoNumbers(a, b) << endl; // Note that attempting to return a value here will cause an error. }


Can you give an example of a structure in C plus plus?

struct point { int x; int y; };


C plus plus prog a function mean that returns the mean of all Values in the given array double mean int list int arraySize?

double mean(int list[], int arraySize) { double result=0; for(int i=0; i<arraySize; ++i ) result += list[i]; return(result/size); }


C plus plus programming for addition of two numbers?

int main() { int x = 40 + 2; }