.
Final Term Papers Spring 2019 (24 August ~ 04 September 2019) & All Solved Past Papers, Solved MCQs & Helping Material
Share Your Final Term Papers Spring 2019 (Questions/Pattern) & Past Papers as well
Today Paper CS304
MCQs zyada template aur STL lec 32 say 45 main say aiy
Long Questions
What is template argumets? (3 marks)
Write three technique for error handling (3 marks)
Identify Inheritance. Problem kya is main aur uska solution bhi btana aur code bhi write krna (5 marks)
Give the pseudo code of non case sensitive comparison function of string class. (5 marks)
ANS:
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); }
What is the output produced by the following program? (5 marks)
; }
ik program likha hua tha error find krna tha (5 marks)
1. #include <iostream>
2. #include <stdlib.h>
3. using namespace std;
4. template <typename T>
5. class MyClass{
6. public:
7. MyClass(){
8. cout"This is class1"endl;
9. }
10. };
11. template <typename T>
12. class MyClass<int*>{
13. public:
14. MyClass(){
15. cout"This is class2"endl;
16. }
17. };
18.
29. int main(int argc, char *argv[])
20. {
21. MyClass<int> c1;
22. MyClass<int*> c2;
23. system("PAUSE");
24. return 0;
25. }
A and B two classes inherit publically. Uskay methds aur data members ka btana konsa acces ho ga (3 marks)
Class A {
Public:
funcA1();
private:
funcA2();
protected
funcA3();
class B : public A {
Public:
funcB1();
private:
funcB2();
protected
funcB3();
};
Function Name Access Yes or No?
funcA1(); ?
funcA1(); ?
funcA1(); ?
funcB1(); ?
funcB1(); ?
funcB1(); ?
My Paper of Cs 304
Mcqs Sary Moaaz ki file sy thy
1: 2 questions thy coding k us ki output likhni thi
2: Next question tha program my error dekhna tha or is line my Jo error uski reason likhni thi
4:What is Template Function ? Desribe it briefly
5:What do you mean by catch Block ?
6:What do u mean by static ? Also describe its member function aik program diya hua tha us k hisab sy likhna tha ye ?
7: Aik program likhna tha jis my sy aik class k template function ko dosri class ka template functiion banana tha is tarha ka khuch tha?
© 2019 Created by + M.Tariq Malik.
Promote Us | Report an Issue | Privacy Policy | Terms of Service