0% found this document useful (0 votes)
128 views8 pages

Ass 1

A virtual function is specified by prefacing the function declaration with the word "virtual". Constructors are not always virtual. C++ functions can be used in C++ with the extern "C" directive. The uppercase manipulator displays hex values from A-F and scientific values with an E. The flush manipulator flushes the output stream.

Uploaded by

ajaygaekwad
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as RTF, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
128 views8 pages

Ass 1

A virtual function is specified by prefacing the function declaration with the word "virtual". Constructors are not always virtual. C++ functions can be used in C++ with the extern "C" directive. The uppercase manipulator displays hex values from A-F and scientific values with an E. The flush manipulator flushes the output stream.

Uploaded by

ajaygaekwad
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as RTF, PDF, TXT or read online on Scribd
You are on page 1/ 8

1 A Virtual function is specified by prefacing the function declaration with word----------Friend Class Object Virtual 2 Find out of the

below program :#include<iostream h> int a=10; void main() { int a=15; count<<"\n a="<<a<<"a="<<::a; ::a=20; count<<"\n a="<<a<<"a="<<::a;} a=15a=15 a=20a=10 a=15a=15 a=20a=20 a=15a=10 a=15a=20 a=10a=15 a=20a=20 3. Which is the manipulator for following purpose ? Display uppercase A-F for hex values & E for scientific values. upperase noshowpos nouppercase none of the above 4. Select correct flag to right jusify output Right Left None Rights 5. Select correct manipulator to flush the output stream. flush Setw() lock end1 6. constructors are always virtual True and False Chose the one Answer

7. "C" functios can also be used in C++ with use of extem "C" directive True and false 8. Find output of the below program. #include<iostream.h> void f(int,int,int); void f(int,int); void main() { f(1,2); } void f(int x, int y, int z) {count<<x<<y<<z,} void f(int x, in y) {cont<<x<<y,} 120 12 Error 12121212 9. 10, Friend Class object virtual 11. The ---------------- Mechanism gives non members of the class to the non public members of a class Allocation Static overload friend 12. != i:Statment sigh nothing Operator 13 .A ---------- is a mechanism for expressing logical grouping Namespace Logic Space Boolen 14. -------------------Functions provide the facility to programmers to define different functions with the same name in different levels of hierarch Duplicate Static data members act as a global varible for its class. True and false A virtual function is specified by prefacing the function declaration with word------------

Key Virtual Copy 15. Uninitialised pointer is valid but unintialised---------------------is invalid

Count Digit Reference NO 16. ----------------Date type can take only two values true of flase Bool Float Char int 17. To -------------------an operator means to write an operator function for that operator. Identify Construct Overload Declare 18. ---------------------- means no restrictions to acces Private Structure Public Protected 19. Find out of the below program "#include<iostrem h> void main (); (count<<"welcome";) welocome "Welcome" Blank Error 20 ------------------- Make it possible for the user to overload a function. Polymorphism Encapsulation Constructor Inheriance 21. A Class derived without any keyword is declared --------------- Derrived Privately Publicly

Globally Randomly 22. Find output of the below program :#include<iostrem h> void man() ( bool b=32; int i=false; count <<end<<b<<","<<I; } false,0 32,0 1,0 32,false 23. Select correct manipulator to show plus sigh for positive values. Skipws Showplus Showps none 24. C++ is upgraded version ofC COBOL At & Pascal 26. find output of the below program #include<iostrem h> void main()

27. --------------- means having two or more function of same name but with diffrent singnature & probably doing same job Downloading Pointer Overloading Constructing 28. A ---------------------- is a data structure in which items are interested at one end, the back & removed at the other end, the front

Object Algorith Queue DFD 29. --------------------------- elements are windows, menus, icons, etc. GUI Class OOP Object 30. find output of the below program. void main() {int c, d; cout<<" c= ' <<c; d=++c; cout<<'d='<<d;cout<<"c="<<c } C=1 d=3 c=3 c=1 d=1 c=1 c=0 d=1 c=1 c=0 d=0 c=1 31. In C++ raising of an exception is called as :Throwing Pointer Compiler Catch 32. find output of the belwo program : #include<iostreamh> void f() ( cout<<"Hello"; ) void main() { f(); } Hello Error "Hello" 'Hello' 33. An operation that creates an instance of a class type & initialises its state is called : Selector Destructor Constructor Structure 34. C++ Programming Language was developed at :-

AT & T Bell Lab Turbo Reddy Lab NASA 35 .---------------------------- is an operation that alerts the state of a class type. Integrator Selector Qualifier Modifier 36. bool x,y, int a=10,b=20, c=30; x=a<b; y= b>=c; values of x & y will be ? error 10,20 true, false false, false 37. cin & cout are objects. True/ false 38. which of the following is applicable to skip white space on input ? leftspace pws skipws skipspace 39. find output of the below program : #include<iostrem.h> void main() { i=10;i++;cout<<i;} Error 1 10 11 40. Convert to hexadecimal : NO such manipulator Hexdec Hex Dec 41. the process of building new classes from exisiting one is called :Recall Encapusulation Virtual

Inheritance 42. ----------------------- Means an operatins that trees the state of an instance of class itself Selector Destructor Constructor Modifier 43. Find output of the below program :#include<iostreamh> void main() { char*str=1="ram Again"; char*&str2=str1; cout<<end1<<str1<<""<<str2; *str2 ='P'; cout<<end1<<str1<<" " <<str2; } Rain Again Rain Again Pain Again Pain Again Rain Again Rain Again Rain Again Rain Again Rain Again Rain Again Pain Again Rain Agan Rain Again Rain Again Rain Again Pain Again 44. -----------------is an English mathematician who invented the concept of using logical operators with true or false values. Bjarne Stroustroup Bill gate George Boole George Bush 45. which is suitable function to read the current width ? Int ios::fill() int ios::width() None of the above wrong question 46

47 which function should be used to set the values in private data memers of the object ? Set data() cout Showdata delete() 48. A reference is an alternative name of an object, sometimes called as;Alias Data Identifier function 49. find output of the blow program :void main() {int a =30; f();} void f() {int b=20:} 30 20,30 30,20 NO OUtput 50. select proper function to extract one character into ch: get(ch) getsa(ch) get(str,ch) Noneff

You might also like