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.


 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

Views: 371

Replies to This Discussion

samina tabassum thanks for sharing ur paper ..best of luck 

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.

MCQS and  short question solved by moaz

Attachments:

 Qamar Munir thanks for sharing 

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