top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

Which factors decide size of a data type for a machine ?

+1 vote
259 views
Which factors decide size of a data type for a machine ?
posted Apr 27, 2017 by Vikram Singh

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

0 votes

It depends on compiler and your machine architecture, operating sytem and processor. In other words it depends on platform. Term platform is the combination of compiler, architecture (32-bit/64) and processor type and operating system.

answer Apr 29, 2017 by Harshita
Similar Questions
+1 vote

Please help me with c program which takes less memory and time to sort a unsorted array of 1000 chars, its order should not be more then O(N) and memory should be most least as possible. Use bit fields and share the program?

+1 vote

Is there any impact of running VM if i increase size of VM ?

+2 votes

Below is the sample code, Where size of a is not defined at the time of compilation,
Then how compiler knows the size of a? If we run the same program in C then compilation will fail.

#include<iostream>
using namespace std;
main()
{
        string a;
        cin>>a;
        cout<<a;
}
...