**Question 1:Identify each of the following as system software and application software.LINUX, DISK CLEANUP, WORD PROCESSOR, WINDOWS, STUDENT INFORMATION (mark 5)Q2:Write the explanation of this program. See program from book pg no534. (mark5)Q3: Write a program which defines three variables of type double which store three different values including decimal points, using set precision manipulators to print all these values with different numbers of digits after the decimal number.(5)Q4 define static variable also explain life time of static variable? (3) Q5 what do you know about run time error? (3)Q6 what are limitation of the friendship between classes? (3)Q7: read the code and explain the functionality of this program? See page 535 for cod (3)Q8: write down the meanings of given below line of code, where m is an object of the class matrix. If (& m = this) (2)Q9: write the general syntax for the definition of the user defined function? (2)Q10: what is the source and destination of cin?(2)Q11: write the general syntax of allocation memory dynamically to an array using new operator? (2)**

1.what is diffrent between pointer and variable?

2.What is difference between Unary and binary operators and how they can be overloaded?

3.how many types of templates?

4.What will be the output of following function if we call this function by passing int 5?

template T reciprocal(T x) {return (1/x); }

5. Identify the errors in the following member operator function and also correct them.

math * operator(math m);

math * operator (math m)

{

math temp;

temp.number= number * number;

return number;

Answer:

The errors are in the arguments of the member operation function and also in the body of operator member function.

Correct function should be

math *operator(math *m);

math *operator (math *m)

{

math temp;

temp = m;

temp.number= number * number;

return temp.number;

2.What is difference between Unary and binary operators and how they can be overloaded?

3.how many types of templates?

4.What will be the output of following function if we call this function by passing int 5?

template T reciprocal(T x) {return (1/x); }

5. Identify the errors in the following member operator function and also correct them.

math * operator(math m);

math * operator (math m)

{

math temp;

temp.number= number * number;

return number;

Answer:

The errors are in the arguments of the member operation function and also in the body of operator member function.

Correct function should be

math *operator(math *m);

math *operator (math *m)

{

math temp;

temp = m;

temp.number= number * number;

return temp.number;

Q: define buffer?explain its usage? 5 MARKS

Q: why binary search algorithm is efficient than linear search algorithm? 5 marks

Q: perator function ka syntex(3 marks)

Q:

post increment and pre increment k syntex btana thay(2 marks)

Q:what is language translator?(2 marks)

Q:

write somethiing something about testing in designing program? 3 MARKS

Q:Read the given below code and explain what task is being performed by this function 5 MARKS

Matrix :: Matrix ( int row , int col )

{

numRows = row ;

numCols = col ;

elements = new ( double * ) [ numRows ] ;

for ( int i = 0 ; i < numRows ; i ++ )

{

elements [ i ] = new double [ numCols ] ;

for ( int j = 0 ; j < numCols ; j ++ )

elements [ i ] [ j ] = 0.0 ;

}

}

Hint : This function belong to a matrix class, having

Number of Rows = numRows

Number of Columns = numCols

Which one (copy constructor or assignment operator) will be

called in each of the following code segment?

1) Matrix m1 (m2);

2) Matrix m1, m2;

m1 = m2;

3) Matrix m1 = m2;

Q: why binary search algorithm is efficient than linear search algorithm? 5 marks

Q: perator function ka syntex(3 marks)

Q:

post increment and pre increment k syntex btana thay(2 marks)

Q:what is language translator?(2 marks)

Q:

write somethiing something about testing in designing program? 3 MARKS

Q:Read the given below code and explain what task is being performed by this function 5 MARKS

Matrix :: Matrix ( int row , int col )

{

numRows = row ;

numCols = col ;

elements = new ( double * ) [ numRows ] ;

for ( int i = 0 ; i < numRows ; i ++ )

{

elements [ i ] = new double [ numCols ] ;

for ( int j = 0 ; j < numCols ; j ++ )

elements [ i ] [ j ] = 0.0 ;

}

}

Hint : This function belong to a matrix class, having

Number of Rows = numRows

Number of Columns = numCols

Which one (copy constructor or assignment operator) will be

called in each of the following code segment?

1) Matrix m1 (m2);

2) Matrix m1, m2;

m1 = m2;

3) Matrix m1 = m2;

1.what is diffrent between pointer and variable?

2.What is difference between Unary and binary operators and how they can be overloaded?

3.how many types of templates?

4.What will be the output of following function if we call this function by passing int 5?

template T reciprocal(T x) {return (1/x); }

5. Identify the errors in the following member operator function and also correct them.

math * operator(math m);

math * operator (math m)

{

math temp;

temp.number= number * number;

return number;

Answer:

The errors are in the arguments of the member operation function and also in the body of operator member function.

Correct function should be

math *operator(math *m);

math *operator (math *m)

{

math temp;

temp = m;

temp.number= number * number;

return temp.number;

Tags:

**How to Get This Badge at Your Profile DP**

**------------------------------------**

Management: Admins ::: Moderators

© 2021 Created by + M.Tariq Malik. Powered by

Promote Us | Report an Issue | Privacy Policy | Terms of Service

We are user-generated contents & non-commercial site. All product, videos, pictures & others contents on site don't seem to be beneath our Copyrights & belong to their respected owners & freely available on public domains. All Contents on site are for personal & non-commercial use.We believe in Our Policy & do according to them. If Any content is offensive in your Copyrights then please email at m.tariqmalik@gmail.com with copyright detail & We will happy to remove it immediately.

Management: Admins ::: Moderators

Awards Badges List | Moderators Group

All Members | Featured Members | Top Reputation Members | Angels Members | Intellectual Members | Criteria for Selection

About Site | Promote Us | Privacy Policy | Terms of Service | Disclaimer | Advertise with Us | Important for All Members Take a Look

Become a Team Member | Safety Guidelines for New | Site FAQ & Rules | Safety Matters | Online Safety | Rules For Blog Post