Answer:
Class is the correct answer for the above question.
Explanation:
In an object-oriented language, The class is a structure type template, which is used to define the structure but the class does not take memory when an object is created then it takes the memory of class type. For example, if a user-defined class of one member whose size is 4 bit if its store in memory. When a user creates an object, then the object size is 4 bit.
That's why the class is an only structure while an object is used to give the memory for class member and the member of the class also get executed by the object of that class. class have no existence if object is not created. so when a user wants to create a object, he needs to create the object by the help of class name because class is user defined data type and object is variable of that class.
Then the answer of the above question is that object is created with the help of class which is described above.
Better graphics getting 1080 p easily running on 240 frames and a higher storage so then you could have more games on the console
Answer:
Check the explanation
Explanation:
#include <iostream>
using namespace std;
void hex2dec(string hex_num){
int n = 0;
//Loop through all characters in string
for(int i=0;i<hex_num.size();i++){
//take ith character
char c = hex_num[i];
//Check if c is digit
if(c>='0' && c<='9'){
n = 16*n + (c-48);
}
//Convert c to decimal
else{
n = 16*n + (c-55);
}
}
cout<<hex_num<<" : "<<n<<endl;
}
int main()
{
hex2dec("EF10");
hex2dec("AA");
return 0;
}
The Output can be seen below :
Answer:
Check the explanation
Explanation:
An integer (int) is of two different bytes and each page has 200 bytes in length. What this means is that each row of array A (100 int) will fits perfectly in a page.
(a) For the initial or first array-initialization loop, one column is processed at a time, so a page fault will be generated at every inner loop iteration, with a total of 100*100=10,000 page faults.
(b) And when it comes to the second array-initialization loop, one row is processed at a time, and a page fault is generated at every outer loop iteration, with a total of 100 page faults.
Hence second array-initialization loop, has better spatial locality.