Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
cs201 final term current paper solve July 2011
#1
CS201 (2011) Current Papers Compiled Page No.1

5 Compiled Current Papers (2011)

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;

CS201 (2011) Current Papers Compiled Page No.2

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# 6

what are limitation of the friendship between classes? (marks3)

Q# 7

Read the code and explain the functionality of this program? See page

535

for cod (marks3)

Q# 8

write down the meanings of given below line of code, where m is an

object of

the class matrix. If (& m = this) (marks 2)

Q# 9

write the general syntax for the definition of the user defined function?

(marks2)

Q# 10

what is the source and destination of cin?(marks2

Q# 11

write the general syntax of allocation memory dynamically to an array

using new

operator? (marks2)

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)

CS201 (2011) Current Papers Compiled Page No.3

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)

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 ] ;

CS201 (2011) Current Papers Compiled Page No.4

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;

CS201 (2011) Current Papers Compiled

: 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;

CS201 (2011) Current Papers Compiled

Q1.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;

0300-9520262
Get solution in 24 hour
|cpmputer & internetConfusedmileys81:[SIZE="4"][SIZE="3"]....[/SIZE][/SIZE]
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  MCM301 MIDTERM solve paper 2011 Vuhelper 4 24,750 03-07-2015, 04:34 PM
Last Post: Xpert
  mgt602 midterm paper 3000 mcq's Xpert 5 11,327 05-30-2013, 02:16 PM
Last Post: Vuhelper
  All Solved Past Papers Mid & Final Term 2008 And 2009 viki 19 15,950 06-09-2012, 05:38 PM
Last Post: gr8touchstone@hotmail.com
  MID TERM PAST PAPER CS401 - Computer Architecture and Assembly SOLVE AND UNSOLVED usmanali126 2 6,358 04-13-2012, 03:27 PM
Last Post: Xpert
  Solved Paper MGT101 Fall 2009 Final Term viki 12 55,582 02-07-2012, 10:52 PM
Last Post: Xpert
  CS304 final term current paper spring Jily 2011 Vuhelper 1 3,483 02-04-2012, 10:34 PM
Last Post: roshi786
  Solved Paper of Final Term 2009 MTH101 Calculus And Analytical Geometry viki 8 11,962 02-04-2012, 12:47 AM
Last Post: Xpert
  CS101 Introduction to Computing FINAL TERM PAPERS SOLVED MCQS January 2012 Vuhelper 2 7,057 02-04-2012, 12:46 AM
Last Post: Xpert
  eng 201 final term paper Business and Technical English Writing January 2012 Vuhelper 3 7,234 01-30-2012, 06:52 PM
Last Post: Xpert
  CS101- Introduction to Computing FINALTERM EXAMINATION mega paper 2012 Vuhelper 0 7,589 01-29-2012, 10:18 PM
Last Post: Vuhelper

Forum Jump:


Users browsing this thread: 1 Guest(s)