0% found this document useful (0 votes)
24 views

1689859607C++ Programming

PROGRAMMING NOTES

Uploaded by

FUTURE POINT
Copyright
© © All Rights Reserved
Available Formats
Download as PDF or read online on Scribd
0% found this document useful (0 votes)
24 views

1689859607C++ Programming

PROGRAMMING NOTES

Uploaded by

FUTURE POINT
Copyright
© © All Rights Reserved
Available Formats
Download as PDF or read online on Scribd
You are on page 1/ 9
RAJEEV GANDHI YOUTH COMPUTER SAKSHARTA MISSION EXAM PAPER Question Cum Answer Booklet Total Marks: 100 (Theory :100), (Practical :100) Every Question Marks: juration= 3Hrs. fo be filled by stu Registration No: . Centre Code: ject Name... Student Name... Father's Name .... [_ ‘Student Signature Examiner Signature Marks Obtained Theory] Practical] Theory [Practical] §=§=__ [Treory]Prectical] theory Practical] Date Subject 200 Designation Notice 1. Verify the number of pages before writing anything. In case of any error in page numbers replace the booklet. 2. This booklet is 2 question cum answer sheet. All the answer must be written in the space provided according to the instruction given for each question. No separate answer sheet will be provided. 3. Write your registration no and other required details only in the space provided only. 4. Writing any unfair text anywhere in the booklet will be liable for making it invalid, 5.Use only Ball pen Black/Blue only. G.Answer sheet other than booklet are liable to be rejected. ‘7.Answer all questions. Each question contains 2 Marks. Read the question carefully before answering them. The total time allotted for answering the question paper is 3Hrs. You will be provided with 10 minutes of reading time extra to go through the question paper before your answering time starts. 8. You have to tick the correct option (for example A or B of C or D) against the respective question Number/Code in the answer sheet provided separately. In case you have ticked the wrong option, cross it and then tick the correct option. Do not mark the question paper. Submit the question paper along with your Answer sheet once you are through with the examination. Ce 1. Who invented C++? a) Dennis Ritchie b) Ken Thompson c) Brian Kernighan d) Bjarne Stroustrup 2. What is C++? a) C++ is an object oriented programming language b) C++ is a procedural programming language c) C++ supports both procedural and object oriented programming language d) C++ is a functional programming language 3. Which of the following is the correct syntax of including a user defined header files in cH? a) #include [userdefined] b) include “userdefined” c) #include d) #include 4. Which of the following is used for comments in C++? a) /* comment *! b) !/ comment */ c) I comment d) both // comment or /* comment */ 5. Which of the following user-defined header file extension used in c++? a) hg b) cpp c)h d)hf 6. Which of the following is a correct identifier in C++? a) VAR_1234 b) $var_name c) 7VARNAME d) 7var_name 7. Which of the following is not a type of Constructor in C++? a) Default constructor b) Parameterized constructor c) Copy constructor d) Friend constructor 8. Which of the following approach is used by C++? a) Left-right b) Right-left c) Bottom-up d) Top-down Ce 9. What is virtual inheritance in C++? a) C++ technique to enhance multiple inheritance b) C++ technique to ensure that a private member of the base class can be accessed somehow c) C++ technique to avoid multiple inheritances of classes d) C++ technique to avoid multiple copies of the base class into children/derived class 40. What happens if the following C++ statement is compiled and executed? int “ptr = NULL; delete ptr; a) The program is not semantically correct b) The program is compiled and executed successfully c) The program gives a compile-time error d) The program compiled successfully but throws an error during run 11. What is the difference between delete and delete[] in C++? a) delete is syntactically correct but delete[] is wrong and hence will give an error if used in any case b) delete is used to delete normal objects whereas delete[] is used to pointer objects c) delete is a keyword whereas delete(] is an identifier d) delete is used to delete single object whereas delete[] is used to multiple(array/pointer of) objects 12. Which of the following is correct about this pointer in C++? a) this pointer is passed as a hidden argument in all static variables of a class. b) this pointer is passed as a hidden argument in all the functions of a class. c) this pointer is passed as a hidden argument in all non-static functions of a class d) this pointer is passed as a hidden argument in all static functions of a class 13, Which of the following type is provided by C++ but not C7 a) double b) float c) int d) boo! 14, By default, all the files in C++ are opened in mode. a) Binary b) VTC c) Text qd) IScil 45. Which of the following correctly declares an array in C++? a) array{10}; b) array array[10}; c) int array; d) int array[10}; Ce 16, What is the use of the indentation in c++? a) r distinguishes between comments and inner data b) distinguishes between comments and outer data c) distinguishes between comments and code d) r distinguishes between comments and outer data 17. Which is more effective while calling the C++ functions? a) call by object b) call by pointer c) call by value d) call by reference 18. Which of the following is used to terminate the function declaration in C++? a) b)] ¢)) qd): 19. Which keyword is used to define the macros in c++? a) #macro b) #define c) macro d) define 20. The C++ code which causes abnormal termination/behaviour of a program should be written under block. a) catch b) throw c) try d) finally 21. What is Inheritance in C++? a) Deriving new classes from existing classes b) Overloading of classes c) Classes with same names d) Wrapping of data into a single class 22. Which of the following symbol is used to declare the preprocessor directives in C++? a)$ b)* o)# q)* 23. What is meant by a polymorphism in C++? a) class having only single form b) class having four forms c) class having many forms d) class having two forms C++ 24, Pick the incorrect statement about inline functions in C++? a) Saves overhead of a return call from a function b) They are generally very large and complicated function c) These functions are inserted/substituted at the point of call d) They reduce function call overheads 25. What is abstract class in C++? a) Any Class in C++ is an abstract class b) Class from which any class is derived c) Class specifically used as a base class with atleast one virtual functions d) Class specifically used as a base class with atleast one pure virtual functions 26. Which of the following constructors are provided by the C++ compiler if not defined ina class? a) Copy constructor b) Default constructor c) Assignment constructor d) All of the mentioned 27. Which concept allows you to reuse the written code in C++? a) Inheritance b) Polymorphism c) Abstraction d) Encapsulation 28. How structures and classes in C++ differ? a) Structures by default hide every member whereas classes do not b) In Structures, members are public by default whereas, in Classes, they are private by default c) Structures cannot have private members whereas classes can have d) In Structures, members are private by default whereas, in Classes, they are public by default 29, What is the benefit of c++ input and output over c input and output? a) Both Type safety & Exception b) Sequence container c) Exception d) Type safety 30. Which of the following is the correct syntax of including a user defined header files in C++? a) #include b) #include c) #include “userdefined” d) #include [userdefined] C++ 31. Which of the following is a correct identifier in C++? a) 7var_name b) 7VARNAME c) VAR_1234 d) $var_name 32. CH is a) Procedural programming language b) Object oriented programming language c) Functional programming language d) Both procedural and object oriented programming language 33. Which of the following is used for comments in C++? a)! comment b) /* comment */ c) both // comment or /* comment */ d) // comment */ 34, What are the actual parameters in C++? a) Parameters with which functions are called b) Parameters which are used in the definition of a function c) Variables other than passed parameters in a function d) Variables that are never used in the function 35. What are the formal parameters in C++? a) Parameters with which functions are called b) Parameters which are used in the definition of the function c) Variables other than passed parameters in a function d) Variables that are never used in the function 36. Which function is used to read a single character from the console in C++? a) cin.get(ch) b) getline(ch) c) read(ch) d) scanf(ch) 37. Which function is used to write a single character to console in C++? a) cout.put(ch) b) cout.putline(ch) c) write(ch) 4d) printf(ch) 38. What are the escape sequences? a) Set of characters that convey special meaning in a program b) Set of characters that whose use are avoided in C++ programs c) Set of characters that are used in the name of the main function of the program d) Set of characters that are avoided in cout statements C++ 39. Which of the following escape sequence represents carriage return? a)\r b)\n c) \n\r d)\c 40. Which of the following escape sequence represents tab? a)\t b) \tir ¢)\b d)\a 41. Who created C++? a) Bjarne Stroustrup b) Dennis Ritchie c) Ken Thompson d) Brian Kernighan 42. Which of the following is called insertion/put to operator? a) << b)>> c)> dj< 43. Which of the following is called extraction/get from operator? a) << b)>> c)> ad< 44. A language which has the capability to generate new data types are called a) Extensible b) Overloaded c) Encapsulated d) Reprehensible 45. Wrapping data and its related functionality into a single entity is known as. a) Abstraction b) Encapsulation c) Polymorphism d) Modularity 46. How structures and classes in C++ differ? a) In Structures, members are public by default whereas, in Classes, they are private by default b) In Structures, members are private by default whereas, in Classes, they are public by default c) Structures by default hide every member whereas classes do not d) Structures cannot have private members whereas classes can have C++ 47. What does polymorphism in OOPs mean? a) Concept of allowing overiding of functions b) Concept of hiding data c) Concept of keeping things in differnt modulesifiles 4d) Concept of wrapping things into a single unit 48. Which concept allows you to reuse the written code? a) Encapsulation b) Abstraction c) Inheritance d) Polymorphism 49. Which of the following shows multiple inheritances? a) A>B>C b) A>B; A>C c) A,B->C d)B>A 50. How access specifiers in Class helps in Abstraction? a) They does not helps in any way b) They allows us to show only required things to outer world c) They help in keeping things together d) Abstraction concept is not used in classes

You might also like