We are here with you hands in hands to facilitate your learning & don't appreciate the idea of copying or replicating solutions. Read More>>

Looking For Something at vustudents.ning.com? Click Here to Search

www.bit.ly/vucodes

+ Link For Assignments, GDBs & Online Quizzes Solution

www.bit.ly/papersvu

+ Link For Past Papers, Solved MCQs, Short Notes & More


Dear Students! Share your Assignments / GDBs / Quizzes files as you receive in your LMS, So it can be discussed/solved timely. Add Discussion

How to Add New Discussion in Study Group ? Step By Step Guide Click Here.

CS304 ALL Current Final Term Papers Fall 2016 & Past Final Term Papers at One Place from 25 February 2017 to 08 March 2017

CS304 ALL Current Final Term Papers Fall 2016 & Past Final Term Papers at One Place from 25 February 2017 to 08 March 2017

+ How to Follow the New Added Discussions at Your Mail Address?

+ How to Join Subject Study Groups & Get Helping Material?

+ How to become Top Reputation, Angels, Intellectual, Featured Members & Moderators?

+ VU Students Reserves The Right to Delete Your Profile, If?


See Your Saved Posts Timeline

Views: 2499

.

+ http://bit.ly/vucodes (Link for Assignments, GDBs & Online Quizzes Solution)

+ http://bit.ly/papersvu (Link for Past Papers, Solved MCQs, Short Notes & More)

+ Click Here to Search (Looking For something at vustudents.ning.com?)

+ Click Here To Join (Our facebook study Group)

Replies to This Discussion

CS304 (7-3-2017)
MCQS 1to all were from WAQAR SINDHU files.
Subjective was also from past papers. Only two questions were new. (1 yad nh araha sory)

1) Consider the following snippets and identify errors:
Snippet no:1:
Template ˂class T˃
class A { };
template ˂class T˃
class B: public A ˂T*˃
{//…}
Snippet No: 2
class B: public A˂T*˃ 
{…}
2) Consider the following nested try…catch blocks and give the order in which catch blocks will be executed when exception is thrown from innermost catch block (given in bold).
int main( ) {
try {
try {
try {
}
catch( char ) { } //THIS WAS IN BOLD
}
catch( float ) { }
}
catch( int ) { }
return 0; }
3) User defined types cannot be passed as an argument to the templates.
Identify this statement as correct or incorrect.
4) Write C++ code for the getIdex() and setIndex() and method of the following template vector class.
template <class T>
class vector{
private:
T* ptr;
int size;
int index;
public:
int get index() const
void setIndex(int i); };
5) Describe a way to declare a template function as a friend of any other class.
6) Using which of the following we can achieve specialization
Private Inheritance
Public Inheritance
Protected Inheritance
7) Name the technique which is used to implement Generic Algorithms in C++
8) Give the names of two types of containers basically known as first class containers.
9) In the program given below
class Shape {

protected:
char _type;
public:
Shape() { } void draw(){ cout “Shape\n”; } int calcArea() { return 0; } char getType() { return _type; } };
class Line : public Shape {
public:
Line(Point p1, Point p2) { }
void draw(){ cout “Line\n”; } };
class Circle : public Shape {
public:
Circle(Point center, double radius) { }
void draw(){ cout “Circle\n”; } int calcArea() { … } };
class Triangle : public Shape {
public:
Triangle(Line l1, Line l2, double angle) { }
void draw(){ cout “Triangle\n”; } int calcArea() { … } };
int main() {
Shape* _shape[ 10 ];
Point p1(0, 0), p2(10, 10); shape[1] = new Line(p1, p2); shape[2] = new Circle(p1, 15);
void drawShapes( shape, 10 ); return 0; }
After compiling this code we will see the following output,
Shape
Shape
Shape
Shape …
If we want to display the following output
Line
Circle
Triangle
Circle
How can we achieve this?
10) Consider the following code,
class Base{private:
void base1();
protected:
void base2();
public:
void base3();};
class Derived: public Base{
private:
void derived1();
protected:
void derived2();
public:
void derived3();};
int main(){
Base * base = new Derived();
return 0; }
Fill in the following table to tell which member functions of Base and Derived classes we can access using the Base pointer in the code indicated in bold?
Function                 Name Availability (Yes / No)?
base2()                  ?
base3()                  ?
derived1()              ?
derived2()              ?
derived3()              ?
11) Suppose a programmer is confuse to select a proper and suitable techniques for the following scenario
a) there are different types and he need similar operations on data types
b) there are different types and he needs identical operations on data types.

RSS

Latest Activity

blackeagle replied to + M.Tariq Malik's discussion EDU402 Curriculum Development Assignment No 01 Fall 2019 Solution & Discussion in the group EDU402 Curriculum Development
28 minutes ago
sardarni joined + M.Tariq Malik's group
41 minutes ago
sardarni joined + M.Tariq Malik's group
1 hour ago
+ "αяsαℓ " Ќąƶµяɨ •" replied to +¢αяєℓєѕѕ gιяℓ's discussion Shadi Ho Rhi Hai Alhamdulillah.......... (^__^)!
1 hour ago
+ "αяsαℓ " Ќąƶµяɨ •" replied to + "αяsαℓ " Ќąƶµяɨ •"'s discussion Happy Marriage to "Zee" & " Nomi weds Noor"....!
1 hour ago
+ "αяsαℓ " Ќąƶµяɨ •" liked +¢αяєℓєѕѕ gιяℓ's discussion Shadi Ho Rhi Hai Alhamdulillah.......... (^__^)!
1 hour ago
+ "αяsαℓ " Ќąƶµяɨ •" replied to +¢αяєℓєѕѕ gιяℓ's discussion Iss tasvir ko Unwan Dein :-P
1 hour ago
+ "αяsαℓ " Ќąƶµяɨ •" liked +¢αяєℓєѕѕ gιяℓ's discussion Iss tasvir ko Unwan Dein :-P
1 hour ago
+ "αяsαℓ " Ќąƶµяɨ •" replied to +¢αяєℓєѕѕ gιяℓ's discussion Wo Naraz Ho Tabhe bhi....!
1 hour ago
+ "αяsαℓ " Ќąƶµяɨ •" liked +¢αяєℓєѕѕ gιяℓ's discussion Wo Naraz Ho Tabhe bhi....!
1 hour ago
+ "αяsαℓ " Ќąƶµяɨ •" replied to +¢αяєℓєѕѕ gιяℓ's discussion Best Places To Propose Someone :-P
1 hour ago
+ "αяsαℓ " Ќąƶµяɨ •" liked +¢αяєℓєѕѕ gιяℓ's discussion Best Places To Propose Someone :-P
1 hour ago
+ Iuuoɔǝut + added a discussion to the group CS302 Digital Logic Design
1 hour ago
+ "αяsαℓ " Ќąƶµяɨ •" replied to zohaib iftikhar's discussion ...* MARD AUR AURAT KA GUNAH ...*
1 hour ago
+ Iuuoɔǝut + added a discussion to the group CS301 Data Structures
1 hour ago
+ "αяsαℓ " Ќąƶµяɨ •" replied to + !! "AS" !!'s discussion Baat Karna ...
1 hour ago
+ "αяsαℓ " Ќąƶµяɨ •" liked zohaib iftikhar's discussion ...* MARD AUR AURAT KA GUNAH ...*
1 hour ago
+ "αяsαℓ " Ќąƶµяɨ •" liked + !! "AS" !!'s discussion Baat Karna ...
1 hour ago
+ "αяsαℓ " Ќąƶµяɨ •" replied to + !! "AS" !!'s discussion Ghalti...
1 hour ago
+ "αяsαℓ " Ќąƶµяɨ •" liked + !! "AS" !!'s discussion Ghalti...
1 hour ago

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

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