Computer Science - Online Test

Q1. The member function defined within the class behave like
Answer : Option A
Explaination / Solution:
No Explaination.


Q2.

Based on the following program answer the question

#include<iostream>

using namespace std;

class Point {

private:

int x, y;

public:

Point(int x1,int y1)

{

x=x1;y=y1;

}

void operator+(Point &pt3);

void show() {cout << "x = " << x << ", y = " << y; } };

void Point::operator+(Point &pt3)

{

x += pt3.x;

y += pt3.y;

}

int main()

{

Point pt1(3,2),pt2(5,4);

pt1+pt2;

pt1.show();

return 0;

}

What is the output for the above program?
Answer : Option A
Explaination / Solution:
No Explaination.


Q3.

Based on the following class declaration answer the question

class vehicle

{ int wheels;

public:

void input_data(float,float);

void output_data();

protected:

int passenger;

};

class heavy_vehicle : protected vehicle {

int diesel_petrol;

protected:

int load;

protected:

int load;

public:

voidread_data(float,float)

voidwrite_data(); };

class bus: private heavy_vehicle {

charTicket[20];

public:

voidfetch_data(char);

voiddisplay_data(); };

};

The data member that can be accessed from the function displaydata()

Answer : Option C
Explaination / Solution:
No Explaination.


Q4. A computer network security that monitors and controls incoming and outgoing traffic is
Answer : Option C
Explaination / Solution:
No Explaination.


Q5. Identify the input device
Answer : Option B
Explaination / Solution:
No Explaination.


Q6. Use Boolean algebra to find the most simplified SOP expression for F = ABD + CD + ACD + ABC + ABCD.
Answer : Option A
Explaination / Solution:
No Explaination.


Q7. How many bits constitute a word?
Answer : Option D
Explaination / Solution:
No Explaination.


Q8. Which of the following Operating systems support Mobile Devices?
Answer : Option D
Explaination / Solution:
No Explaination.


Q9. Which of the following in Ubuntu OS is used to view the options for the devices installed?
Answer : Option A
Explaination / Solution:
No Explaination.


Q10. If 0 < i before the assignment i := i-1 after the assignment, we can conclude that
Answer : Option B
Explaination / Solution:
No Explaination.