web analytics

How does a static member variable or static data member differs from a non-static variable or data? Explain with an example.

Static Data Member and Difference with Non-static Data Member: In general when we declare some objects of a class, each object is allocated with memory space for each variable of the class separately under them as given below, But in the case of static data member only one memory location will be allocated and that … Read more

Is it possible to return an object from a function? Justify your answer with an example.

Return of an Object from a Function: Yes it is possible to return an object from a function. An object can be returned to the call of its function by another object. For the justification considering the following program, //Returning of object#include<iostream.h>class myclass{ int i; public: void set_i(int n){ i=n; /*Ln 3*/ } int get_i(){ … Read more

Is it possible to pass an object from one function to another ─ justify from an example.

Passing Objects:An object can be used as a function argument in the following two ways, pass-by-value pass-by-reference Using the first option given above we pass the value of an object to a function where the value of the used object will not change, but only be used. Use of the second will change the object … Read more

What are the purpose of using command byte A and command byte B on 82C55A? Explain with suitable example.

Purpose of Using Command Byte A: Command byte A is used select modes, working functions of the ports. So the importance of using command byte A is that we can define on which mode it will be working on and which port will be used for which function such as input or output. For example, … Read more

What is handshaking? Write a suitable example for handshaking with necessary assembly codes.

Handshaking:  Handshaking is a I/O control method to synchronize I/O devices with the microprocessor. As many I/O devices accepts or release information at a much slower rate than the microprocessor, this method is used to control the microprocessor to work with a I/O device at the I/O devices data transfer rate. Example:  Supposing that we … Read more

What are data structures and why are they important?

What are data structures and why are they important?

Data structures are systematic ways to organize, manage, and store data in order to facilitate efficient access and modification. They define the layout of data, the relationships between different data elements, and the operations that can be performed on the data. Common data structures include arrays, linked lists, stacks, queues, trees, and graphs. Each of … Read more