Computer Science - Online Test

Q1. The constant variable can be declared using
Answer : Option B
Explaination / Solution:
No Explaination.


Q2. How many bytes of memory allocates for the following variable declaration if you are using Dev C++? short int x;
Answer : Option A
Explaination / Solution:
No Explaination.


Q3. Which of the following is the exit control loop?
Answer : Option C
Explaination / Solution:
No Explaination.


Q4. By default, the string and with which character?
Answer : Option A
Explaination / Solution:
No Explaination.


Q5. Which of the following is the most important advantage of inheritance?
Answer : Option B
Explaination / Solution:
No Explaination.


Q6. Which of the following access specifier protects data from inadvertent modifications?
Answer : Option A
Explaination / Solution:
No Explaination.


Q7.

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 member function that can be accessed by an objects of bus Class is

Answer : Option C
Explaination / Solution:
No Explaination.


Q8. The process of converting cipher text to plain text is called
Answer : Option B
Explaination / Solution:
No Explaination.


Q9. ………… Output device is used for printing building plan, flex board, etc.
Answer : Option B
Explaination / Solution:
No Explaination.


Q10. The NAND or NOR gates are referred to as "universal" gates because either:
Answer : Option B
Explaination / Solution:
No Explaination.