CS304 Final Term Solved Subjective Set 2 by VUBuddy
- Type
- Final term past paper
- Course
- CS304 Object Oriented Programming
- Size
- PDF 252 KB
- Updated
- 23 Oct 2026
You get 3 free files a day on the website. Add the Chrome extensionSign in with the extension for 30 a day.
Preview text
Text from pages 1, 2, 3 of 23. Download the file for all 23 pages.
CS304-Object Oriented programming NEW Solved Final terms papers with
references from 2012-2013 by
Q) Describe the way to declare a template function as a friend of any class?(2marks)
Answer: (Page 294)
Template<class U>
Void doSomething (U);
Template<class V>;
Class A{
int data;
Class B{
int data;
friend void doSomething(T);
friend A<T>; int.this function will take 2 parameters one will be pointer and other will be will be size of array (mrk3)
Answer: (Page 257)
Void printArray(T*array,int size)
For(int i=0;i<size;i++)
Cout<<array[i];
int main()
int iArray[5]={1,2,3,4,5};
void printArray(iArray,5);
return 0; Q) Consider the code below,
Q) Give line number having any error/errors in this code explain the reason for error/s and give corrected code as well.
Answer: Test< float > t3 = t1; There is an error in this line due to conversion from int to float but in a wrong way
Q) Why Abstract class’s objects cannot be instantiated?
Answer: (Page 230) Abstract class’s objects cannot be instantiated they are used for inheriting interface or implementation so that derived classes can give implementation of these concepts.
Related CS304 files
All CS304 files →- CS304 Final Term MCQs Final term PDF 433 KB
- CS304 Final Term MCQs Set 2 Final term PDF 408 KB
- CS304 Final Term Solved File 8 by Team Hadi Final term PDF 499 KB
- CS304 Final Term Quizzes July 2023 by Sana Sheikh Final term PDF 590 KB
- CS304 Highlighted Handouts Set 5 Highlighted PDF 3.7 MB
- CS304 Quiz 1 Lectures 1-10 by Junaid Quiz PDF 1.1 MB
Get more out of VUBuddy, for free
- Unlimited downloads
- The explanation behind every MCQ answer
- Study offline on slow data
- 30 downloads a day instead of 3
- Sign in and buy Pro Semester here
One Pro Semester membership works in both the extension and the app.