6 Programming Languages
6 Programming Languages
6 Programming Languages
✓ పో టీపరీక్షలకు ప్రిప్ేరయ్యే అభ్ేరధులకు "AtoZ Telugu News" App చాలా ఉపయోగపడుత ుంది. ఈ
APP లో పితిరోజు LATEST JOBS, డైలీ Curent Affairs, ఎపపటికపపపడు జరిగే మొతత ుం విదాే
సమాచారాన్ని ఈ APP లో UPDATE చేసత త ఉుంటాము.
✓ ఇుంకా ఎపపటికపపపడు మీ చుటటుపకకల జరిగే తాజా వారత లను కూడా చతడవచుు. ఇపపడే మా App
ను Download చేసుక ుండి.
➢ App Link:
https://play.google.com/store/apps/details?id=com.app.atoznews
1) What is OOPS?
OOPS is abbreviated as Object Oriented Programming system in which programs are
considered as a collection of objects. Each object is nothing but an instance of a class.
2) Write basic concepts of OOPS?
Following are the concepts of OOPS:
1. Abstraction
2. Encapsulation
3. Inheritance
4. Polymorphism
3) What is a class?
A class is simply a representation of a type of object. It is the blueprint/plan/template
that describes the details of an object.
4) What is an Object?
An object is an instance of a class. It has its own state, behavior, and identity.
5) What is Encapsulation?
Encapsulation is an attribute of an object, and it contains all data which is hidden. That
hidden data can be restricted to the members of that class.
A friend can be declared anywhere in the class declaration, and it cannot be affected by
access control keywords like private, public, or protected.
14) What is function overloading?
Function overloading is a regular function, but it can perform different tasks. It allows the
creation of several methods with the same name which differ from each other by the
type of input and output of the function.
Example
Overriding is the same method names with the same arguments and return types
associated with the class and its child class.
26) What is the main difference between a class and
an object?
An object is an instance of a class. Objects hold multiple information, but classes don’t
have any information. Definition of properties and functions can be done in class and
can be used by the object.
Doing Inheritance from that class.-Use Base Keyword from a derived class.
31) What is the difference between new and override?
The new modifier instructs the compiler to use the new implementation instead of the
base class function. Whereas, Override modifier helps to override the base class
function.
32) What are the various types of constructors?
There are three types of constructors:
– Default Constructor – With no parameters.
The superclass is the parent class from which another class inherits.
45) What is static and dynamic Binding?
Binding is nothing but the association of a name with the class. Static Binding is a
binding in which name can be associated with the class during compilation time, and it
is also called as early Binding.
Dynamic Binding is a binding in which name can be associated with the class during
execution time, and it is also called as Late Binding.
46) How many instances can be created for an
abstract class?
Zero instances will be created for an abstract class. In other words, you cannot create
an instance of an Abstract Class.
47) Which keyword can be used for overloading?
Operator keyword is used for overloading.
48) What is the default access specifier in a class
definition?
Private access specifier is used in a class definition.
49) Which OOPS concept is used as a reuse
mechanism?
Inheritance is the OOPS concept that can be used as a reuse mechanism.
50) Which OOPS concept exposes only the necessary
information to the calling functions?
Encapsulation
ANSWER:B
3………………….. are explicitly reserved identifiers and cannot be used as names for
the program variables or other user defined program elements.
A) Keywords
B) Identifiers
C) Constants
D) Strings
ANSWER:A
4. State whether the following statements are True or False for C++ identifiers.
i) Only alphabetic characters, digits and underscores are permitted.
ii) The name can start with a digit.
iii) Uppercase and lowercase letters are distinct.
A) i-True, ii-True, iii-False
B) i-True, ii-False, iii-True
C) i-True, ii-False, iii-False
D) i-True, ii-True, iii-True
ANSWER; B
5. In C++, ………………….. refer to fixed values that do not change during the
execution of a program.
A) Identifiers
B) Constants
C) Strings
D) Operators
ANSWER: B
ANSWER: C
7. The ……………………. data type was used to specify the return type of a function
when it is not returning any value.
A) int
B) float
C) void
D) double
ANSWER:C
8. A ………………….. can be assigned a pointer value of any basic data type, but it may
not de-referenced.
A) int pointer
B) void pointer
C) generic pointer
D) non-void pointer
ANSWER:C
9. Which of the following is NOT the user defined data type in C++.
A) Structure
B) Pointer
C) Union
D) Class
ANSWER;B
10. Which of the following is/are the derived data types in C++.
i) array ii) function iii) pointer iv) class
A) i, ii and iii only
B) ii, iii and iv only
C) i, iii and iv only
D) All i, ii, iii and iv
ANSWER:A
11. In the case of ……………………… in C++, we can not modify the address that the
pointer is initialized.
ANSWER: A
ANSWER:B
13. Which of the following is the correct way of declaring constant pointer in C++.
A) char const * pointer1=”OK”;
B) char * const pointer1=”OK”;
C) const * char pointer1=”OK”;
D) const char * pointer1=”OK”;
ANSWER: B
14. Which of the following is the correct way of declaring pointer to a constant in C++.
A) int * const pointer1=&p;
B) const * int pointer1=&p;
C) int const * pointer1=&p;
D) int pointer1 * const=&p;
ANSWER: C
15. We can create …………………….. in C++ using the qualifier constant and defining a
set of integer constant using enum keywords.
A) basic constant
B) number constant
C) symbolic constant
D) named constant
ANSWER;C
ANSWER;D
17. ………………… are widely used in C++ for memory management and to achieve
polymorphism.
A) Pointers
B) Array
C) Function
D) Class
ANSWER;A
18. C++ permits initialization of the variables at run time which is referred to as
………………. initialization.
A) static
B) dynamic
C) variable
D) runtime
ANSWER:B
ANSWER;D
ANSWER;B