vu cs302 Mid Term Subjective Solved Past Paper No.1

vu cs302 Digital Logic Design Solved Past Papers

Solved Past Papers

This subjective solved past paper is related to book/course code vu cs302 Digital Logic Design which belongs to vu organization. We have 5 past papers available related to the book/course Digital Logic Design. This past paper has a total of 10 subjective questions belongs to topic Mid Term to get prepared. NVAEducation wants its users to help them learn in an easy way. For that purpose, you are free to get prepared for exams by learning subjective questions online on NVAEducatio.

NVAEducation also facilitates users to download these solved past papers with an affordable prices. However, users are not enforced to pay for money, rather they can use credits to buy such stuff on NVAEducation. Users can earn credits for doing some little tasks and then you will be able to use that credits to buy solved past papers on NVAEducation.

Question 6: If, within a class, da is a member variable, will the statement this.da=25; assign 25 to da?
Answer:
No because "this" is pointer, so using pointer to object we use the -> operator to access object member function and data member,
Question 7: What are Accessor Functions, Explain with an example?
Answer:

Accessor functions are used to access private data of the object, we provide accessor functions to get and set private data members of the class.

Example

class Student{

int rollNo;
public:
void setRollNo(int aRollNo){
rollNo = aRollNo;
}
};
Avoiding Error
void Student::setRollNo(int aRollNo){
if(aRollNo < 0){
rollNo = 0;
}(Page93)
Question 8: What are binary operators. Give an example of binary operators overloading using any class.
Answer:

Binary Operators Overloading

Binary operators act on two quantities.

Examples of binary operators:

overloading + operator:
class Complex{
private:
double real, img;
public:

Complex operator +(const Complex & rhs);
};
Complex Complex::operator +( const Complex & rhs){
Complex t;
t.real = real + rhs.real;
t.img = img + rhs.img;
return t;
}
Question 9: What is composition. Explain it with the help of an example.
Answer:

An object may be composed of other smaller objects, the relationship between the "part" objects and the "whole" object is known as Composition, and Composition is represented by a line with a filled-diamond head towards the composer object. For example a man and his body parts have the relation of "part" objects and the "whole" object is known as Composition of man. (Page 52)


Solved Past Papers of cs302 Digital Logic Design

Other cs related subjective solved past papers

Other categories of vu Solved Past Papers

Other organizations

Theme Customizer

Gaussian Texture



Gradient Background