The first one is 0 (0/3=0)
The second one is 3 (3/3=1)
The third one is 2 (6/3=2)
The fourth one is 9 (9/3=3)
Hope this helps you :)
Answer:
Reference type,generic type
Explanation:
Reference types are used by a reference that maintains a reference (address) to the object but not the object itself. Because reference kinds reflect the variable's address rather than the data itself, assigning a reference object to another does not copy the information. Instead, it produces a second duplicate of the reference, which relates to the same heap place as the initial value.
Examples of reference types are Classes, Arrays,, Interfaces etc.
A generic type is a generic class or interface that is parameterized over kinds. Essentially, generic types enable you to write a particular, generic class (or method) that operates with distinct kinds, enabling code to be reused.
The class Object describes the conduct of all Java objects. However, it does not describe the conduct of all Java data structures. That's because not all Java data structures are objects. Some of them are primitive values that can be stored in object variables, but they are not objects themselves.
Unlike object types, primitive types are not sub types or super types.
Its c storing and charting data from surveys
Answer:
Reseat the new stick of RAM
Explanation:
Joe needs to reseat the new stick of the RAM. For that, he should gently release the clips which hold RAM in the correct posture, and one on each side. Joe is required to do this for each of the available memory modules. And then he will have the cautiously replace all the memory modules( 2 in number) through to DIMM slots which are on the motherboard. Make sure that you have noted down the locations of each notches on the RAM as well as the DIMM slots.
Answer:
#include<iostream>
#include<cstring>
#include <algorithm>
using namespace std;
class Student{
public:
string name;
int rollNo;
Student(){
}
Student(string n, int r){
name = n;
rollNo = r;
}
};
class ClassRoom{
public:
Student stud[10];
int count;
ClassRoom(){
count = 0;
}
void addStudent(string str,int roll){
Student s(str,roll);
stud[count++] = s;
}
Student * getAllStudents(){
return stud;
}
};
int main()
{
string name;
char temp[20];
int rollNo, N, i;
Student * students;
ClassRoom classRoom;
i=0;
while(getline(cin, name) && cin.getline(temp,20)&&i<10){
rollNo = atoi(temp);
classRoom.addStudent(name, rollNo);
i++;
}
N = i;
students = classRoom.getAllStudents();
for(int i=0 ; i < N; i++){
cout << (students+i)->rollNo << " - " << (students+i)->name;
if(i<N-1)
cout<<endl;
}
return 0;
}
Explanation:
- In the addStudent method, increment the counter and as the value of variable s to the the stud array.
- In the getAllStudents method, return all the students.
- Finally in the main method, display the name and roll no. of students.