Latest Activity In Study Groups

Join Your Study Groups

VU Past Papers, MCQs and More

We non-commercial site working hard since 2009 to facilitate learning Read More. We can't keep up without your support. Donate.


All Current Final Term Papers Spring 2013

From 20 Jul , 2013 to 31 Jul 2013 Spring 2013

 

PLZ Share Ur Papers Files Also where u Study

Views: 4460

Replies to This Discussion

kindly inko our jo current papers guys share kar rahy hain ,solve kar ke aik file mein share karain .....

thanks


 Q:1: Can a constructor throw an exception? How to handle the errors, when the constructor fails?

Answer:

- Yes, Constructor can throw an exception But In constructor if an exception is thrown than all objects created so far are destroyed. Exception due to constructor of any contained object or the constructor of a parent class can be caught in the member initialization list.

q.2. Give the pseudo code of non case sensitive comparison function of string class.

Answer:

int caseSencompare( char* str1, char* str2 ) { for (int i = 0; i < strlen( str1 ) && i < strlen( str2 ); ++i) if ( str1[i] != str2[i] ) return str1[i] - str2[i]; return strlen(str1) - strlen(str2);

q.3 What are the container requirements?

q.4. Give the C++ code of template function to print the values of any type of array I int.this function will take 2 parameters one will be pointer and other will be will be size of array (mrk5)

Answer:- (Page 257) template< typename T > void printArray( T* array, int size ) { for ( int i = 0; i < size; i++ ) cout array[ i ] “, ”; // here data type of array is T } Give the name of three

q.5Give the name of three operation that a corsor or itrator generally provide (mrk3)

Answer:-

 •T* first() • T* beyond() • T* next( T* )

q.6what are container classes? How many types of container classes are there?

Answer:-

 Container is an object that contains a collection of data elements like we have studied before now we will study them in detail. STL provides three kinds of containers, 1. Sequence Containers 2. Associative Containers 3. Container Adapters

past paper me sey muje sara paper aya

baki jo program aye wo yaad nai ap past paper waly ur try wale program lazmi kren



Read more: tody my paper 304 oop - Virtual University of Pakistan http://vustudents.ning.com/group/cs304objectorientedprogramming/for...

Salam Paper was little bit tough because over all paper was conceptual and not from past papers.

40 mcqs

Q1.Explain Vector ivec(4,3)?

Q2.Describe key components of STL?

Q3.Give tempalte of function to print value of any type?

Q4.

2.Consider the code below,
template< typename T >
class T1 {
public:
T i;
protected:
T j;
private:
T k;
friend void Test();
};

This code has a template class T1 with three members i,j and k and a friend function Test(), you have to
describe which member/s of T1 will be available in function Test().

Q5.What is Graceful termination write C++ code?
Q6.

What would be the output of this code?

class mother {

  public:

    mother ()

      { cout "mother: no parameters\n"; }

    mother (int a)

      { cout "mother: int parameter\n"; }

};

class daughter : public mother {

  public:

    daughter (int a)

      { cout "daughter: int parameter\n\n"; }

};

class son : public mother {

  public:

    son (int a) : mother (a)

      { cout "son: int parameter\n\n"; }

};

 

int main () {

  daughter rabia (0);

  son salman(0);

  return 0;

}

and some more questions about overloading and destructors and output of the codes.....

Farheen batool thanks for sharing,,best of luck for ur result 

Attention Related Final Term papers Spring 2013: All Fellows You don’t need to go at any other site for current Final Term papers Spring  2013, Because All discussed data/sharing of our members in this discussion are going from here to other sites. (Other sites Admins/mods Copy from here & posted at their sites with fake IDs or original name: p). you can judge this at other sites yourself. So don’t waste your precious time with different links.

My todays paper subjective 

Attachments:
  1. What do you know about function templates? Describe it briefly.

 

  1.  Explain the statement below,

vector<int> ivec(4, 3);

 

  1. Give the name of two basic types of containers collectively called First class containers?

 

  1. What is difference between simple association and aggregation?

 

  1. Enlist the kinds of association with respect to Cardinality.

 

  1. Identify and correct the syntax error(s) in the given code snippet?

template<classname T>

class Template_class {

 

                   private:

                   T data;

                   //…

                   Public:

                             //…

                    void input();

           };

template< class T >

void Template_class::input(  ) {

cin>>data;

}

void main()

{

Template_class <int>obj;

obj.input();

}

 

  1. Consider the code below,

 

template< typename T >

class T1 {

    public:

    T i;

    protected:

    T j;

    private:

    T k;

    friend void Test();

    };

   

This code has a template class T1 with three members i,j and k and a friend function Test(), you have to describe which member/s of T1 will be available in function Test().

 

  1. Give the general syntax of nested try catch blocks?

 

  1. Consider the following code:

class Tutor{

int id;

char * name;

public:

Tutor(int, char*){

-------

-------

}

Tutor(const Tutor & obj){

------

------

}

};

Implement copy constructor for the Tutor class by shallow copy and by deep copy.

 

10. What would be the output of this code?

 

class mother {

  public:

    mother ()

      { cout "mother: no parameters\n"; }

    mother (int a)

      { cout "mother: int parameter\n"; }

};

 

class daughter : public mother {

  public:

    daughter (int a)

      { cout "daughter: int parameter\n\n"; }

};

 

class son : public mother {

  public:

    son (int a) : mother (a)

      { cout "son: int parameter\n\n"; }

};

 

int main () {

  daughter rabia (0);

  son salman(0);

 

  return 0;

}

 

 

 

11. What is the output produced by the following program?

 

#include<iostream.h>

 

void sample_function(double test) throw (int);

 

int main()

{

        try

        {

                  cout ”Trying.\n”;

                  sample_function(98.6);

                  cout “Trying after call.\n”;

        }

        catch(int)

        {

                  cout “Catching.\n”;

        }

       

        cout “End program.\n”;

        return 0;

}

void sample_function(double test) throw (int)

{

        cout “Starting sample_function.\n”;

        if(test < 100)

             throw 42;

 }

 

12. Write C++ code for the constructor of following template Vector class.

 

template< class T >

class Vector {

private:

        T* ptr;

        int size;

        int index;

public:

        Vector( int = 10 );  // constructor    

};

 

 

 

 

 

 

 

 

 

+ Mმlἶყმ ♥ thanks for sharing ur paper..best of luck for ur result 

Attention Related Final Term papers Spring 2013: All Fellows You don’t need to go at any other site for current Final Term papers Spring  2013, Because All discussed data/sharing of our members in this discussion are going from here to other sites. (Other sites Admins/mods Copy from here & posted at their sites with fake IDs or original name: p). you can judge this at other sites yourself. So don’t waste your precious time with different links.

RSS

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

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