SlideShare una empresa de Scribd logo
1 de 26
C++ Programming Questions
Useful for all Companies Interviews,
UGC-NET, GATE EXAM
PART- 1
1. How any types of linkage are there in c++?
a) 1
b) 2
c) 3
d) 4
View Answer
Answer:c
2. To use internal linkage we have to use which keyword?
a) static
b) extern
c) static or extern
d) none of the mentioned
View Answer
Answer:a
3. Which one is used to refer to program
elements in any translation units?
a) internal linkage
b) external linkage
c) no linkage
d) none of the mentioned
View Answer
Answer:b
. What is the defualt type oof linkage that are
available for identifires?
a) internal
b) external
c) no linkage
d) none of the mentioned
View Answer
Answer:b
. Pick out the other definition of objects.
a) member of the class
b) associate of the class
c) attribute of the class
d) instance of the class
View Answer
Answer:d
Explanation:None.
7. How many objects can present in a single
class?
a) 1
b) 2
c) 3
d) as many as possible
View Answer
Answer:d
To use external linkage we have to use which
keyword?
a) static
b) extern
c) const
d) none of the mentioned
View Answer
Answer:b
Explanation:extern keyword is used to
represent identifiers from other programs.
7. Which is used to use a function from one
source file to another?
a) code
b) declaration
c) prototype
d) none of the mentioned
View Answer
Answer:c
Which is used to define the member of a class
externally?
a) :
b) ::
c) #
d) none of the mentioned
View Answer
Answer:b
Explanation:None.
4. Which other keywords are also used to
declare the class other than class?
a) struct
b) union
c) object
d) both a & b
View Answer
Answer:d
8. What is the use of no linkage?
a) make the entity visible to other programs
b) make the entity visible to other blocks in the
same program.
c) make the entity visible only to that block
d) none of the mentioned
View Answer
Answer:c
Which of these following members are not
accessed by using direct member access
operator?
a) public
b) private
c) protected
d) Both b & c
View Answer
Answer:d
7. Which of the following is a valid class
declaration?
a) class A { int x; };
b) class B { }
c) public class A { }
d) object A { int x; };
View Answer
Answer:a
Explanation:None.
8. The fields in the class in c++ program are by
default
a) protected
b) private
c) public
d) none of the mentioned
View Answer
Answer:b
. Where does the object is created?
a) class
b) constructor
c) destructor
d) attributes
View Answer
Answer:a
Explanation:In class only all the listed items
except class will be declared.
2. How to access the object in the class?
a) scope resolution operator
b) ternary operator
c) direct member access operator
d) none of the mentioned
View Answer
Answer:c
. What does your class can hold?
a) data
b) functions
c) both a & b
d) none of the mentioned
View Answer
Answer:C
Explanation:The classes in c++ are used to
manipulate both data and functions.
2. How many specifiers are present in access
specifiers in class?
a) 1
b) 2
c) 3
d) 4
View Answer
Answer:c
Explanation:None.
9. Constructors are used to
a) initalize the objects
b) construct the data members
c) both a & b
d) none of the mentioned
View Answer
Answer:a
Explanation:Once the object is declared
means, the constructor are also declared by
default.
10. When struct is used instead of the keyword
class means, what will happen in the program?
a) access is public by default
b) access is private by default
c) access is protected by default
d) none of the mentioned
View Answer
Answer:a
What is the output of this program?
1.#include <iostream>
2.using namespace std;
3.int main()
4.{
5.int i;
6.enum month {
7.JAN,FEB,MAR,APR,MAY,JUN,JUL,AUG,SEP,OCT,DEC
8.};
9.for (i = JAN; i <= DEC; i++)
10.cout << i;
11.return 0;
12.}
a) 012345678910
b) 0123456789
c) 01234567891011
d) none of the mentioned
View Answer
Answer:a
. Which keyword is used to define the user
defined data types?
a) def
b) union
c) typedef
d) type
View Answer
Answer:c
Explanation:None.
2. Identify the correct statement.
a) typedef does not create different types.It
only creates synonyms of existing types.
b) typedef create different types.
c) both a & b
d) none of the mentioned
View Answer
Answer:a
7. What is the syntax of user-defined data
types?
a) typedef_existing data type_new name
b) typedef_new name_existing data type
c) def_existing data type_new name
d) none of the mentioned
View Answer
Answer:a
Explanation:None.
8. How many types of user-defined data type
are in c++?
a) 1
b) 2
c) 3
d) 4
View Answer
Answer:c
What is the scope of typedef defined data
types?
a) inside that block only
b) whole program
c) outside the program
d) none of the mentioned
View Answer
Answer:b
Explanation:We are defining the user-defined
data type to be availed only inside that
program, if we want to use anywhere means
we have to define those types in the header
file.
10. How many types of models are available to
create the user-defined data type?
a) 1
b) 2
c) 3
d) 4
View Answer
Answer:b
. Pick the other name of operator function.
a) function overloading
b) operator overloading
c) member overloading
d) None of the mentioned
View Answer
Answer:b
Explanation:None.
2. Which of the following operators can’t be
overloaded?
a) ::
b) +
c) –
d) [] View Answer
Answer:a
. How to declare operator function?
a) operator operator sign
b) operator
c) operator sign
d) None of the mentioned
View Answer
Answer:a
How many real types are there in complex
numbers?
a) 1
b) 2
c) 3
d) 4
View Answer
Answer:c
. Which of the following statements is NOT
valid about operator overloading?
a) Only existing operators can be overloaded.
b) Overloaded operator must have at least one
operand of its class type.
c) The overloaded operators follow the syntax
rules of the original operator.
d) None of the mentioned
View Answer
Answer:d
Explanation:None.
9. Operator overloading is
a) making c++ operator works with objects
b) giving new meaning to existing operator
c) making new operator
d) both a & b
View Answer
Answer:d
. Which header file is used to declare the
complex number?
a) complexnum
b) complex
c) complexnumber
d) None of the mentioned
View Answer
Answer:b
Explanation:None.
2. How to declare the complex number?
a) (3,4)
b) complex(3,4)
c) (3,4i)
d) None of the mentioned
View Answer
Answer:b
Which of the following is not a function of
complex values?
a) real
b) imag
c) norm
d) cartesian
View Answer
Answer:d
How many parameters does a conversion
operator may take?
a) 0
b) 1
c) 2
d) as many as possible
View Answer
Answer:a
1. What is the return type of the conversion
operator?
a) void
b) int
c) float
d) no return type
View Answer
Answer:d
Explanation:Conversion operator doesn’t have
any return type not even void.
2. Why we use the “dynamic_cast” type
conversion?
a) result of the type conversion is a valid
b) to be used in low memory
c) result of the type conversion is a invalid
d) None of the mentioned
View Answer
Answer:a
. How types are there in user defined
conversion?
a) 1
b) 2
c) 3
d) 4
View Answer
Answer:b
Explanation:There are two types of user-
defined conversions.They are conversion by
constructor, Conversion functions.
10. Pick out the correct syntax of operator
conversion.
a) operator float()const
b) operator float()
c) operator const
d) None of the mentioned
View Answer
Answer:a
Which rule will not affect the friend function?
a) private and protected members of a class
cannot be accessed from outside
b) private and protected member can be
accessed anywhere
c) both a & b
d) None of the mentioned
View Answer
Answer:a
Explanation:Friend is used to access private
and protected members of a class from outside
the same class.
2. Which keyword is used to declare the friend
function?
a) firend
b) friend
c) classfriend
d) myfriend
View Answer
Answer:b
3. What is the syntax of friend function?
a) friend class1 Class2;
b) friend class;
c) friend class
d) None of the mentioned
View Answer
Answer:a
3. What will happen when the function call
operator is overloaded?
a) It will not modify the functions.
b) It will modify the functions.
c) It will modify the object.
d) It will modify the operator to be interpreted.
View Answer
Answer:d
9. Pick out the correct statement.
a) A friend function may be a member of
another class.
b) A friend function may not be a member of
another class.
c) A friend function may or may not be a
member of another class.
d) None of the mentioned
View Answer
Answer:c
Explanation:None.
10. Where does keyword ‘friend’ should be
placed?
a) function declaration
b) function definition
c) main function
d) None of the mentioned
View Answer
Answer:a
. What is the use of function call operator?
a) overloading the methods
b) overloading the objects
c) overloading the parameters
d) none of the mentioned
View Answer
Answer:b
Explanation:None.
2. Pick out the correct statement.
a) virtual functions does not give the ability to
write a templated function.
b) virtual functions does not give the ability to
rewrite a templated function.
c) virtual functions does give the ability to
write a templated function.
d) none of the mentioned
View Answer
Answer:a

Más contenido relacionado

La actualidad más candente

La actualidad más candente (20)

4 pillars of OOPS CONCEPT
4 pillars of OOPS CONCEPT4 pillars of OOPS CONCEPT
4 pillars of OOPS CONCEPT
 
Oops Quiz
Oops QuizOops Quiz
Oops Quiz
 
Oop c++class(final).ppt
Oop c++class(final).pptOop c++class(final).ppt
Oop c++class(final).ppt
 
Operators in C++
Operators in C++Operators in C++
Operators in C++
 
C++ interview question
C++ interview questionC++ interview question
C++ interview question
 
Class or Object
Class or ObjectClass or Object
Class or Object
 
Operators in C/C++
Operators in C/C++Operators in C/C++
Operators in C/C++
 
Exception handling
Exception handlingException handling
Exception handling
 
Exception handling in python
Exception handling in pythonException handling in python
Exception handling in python
 
Control structures in c++
Control structures in c++Control structures in c++
Control structures in c++
 
Inline function
Inline functionInline function
Inline function
 
itft-Decision making and branching in java
itft-Decision making and branching in javaitft-Decision making and branching in java
itft-Decision making and branching in java
 
interface in c#
interface in c#interface in c#
interface in c#
 
Basic of Structure,Structure members,Accessing Structure member,Nested Struct...
Basic of Structure,Structure members,Accessing Structure member,Nested Struct...Basic of Structure,Structure members,Accessing Structure member,Nested Struct...
Basic of Structure,Structure members,Accessing Structure member,Nested Struct...
 
Statistical learning
Statistical learningStatistical learning
Statistical learning
 
Lp 2
Lp 2Lp 2
Lp 2
 
Delegates and events in C#
Delegates and events in C#Delegates and events in C#
Delegates and events in C#
 
Interfaces .net
Interfaces .netInterfaces .net
Interfaces .net
 
Looping Statement And Flow Chart
 Looping Statement And Flow Chart Looping Statement And Flow Chart
Looping Statement And Flow Chart
 
Windowforms controls c#
Windowforms controls c#Windowforms controls c#
Windowforms controls c#
 

Similar a PART - 1 Cpp programming Solved MCQ

UGC-NET, GATE and all IT Companies Interview C++ Solved Questions PART - 2
UGC-NET, GATE and all IT Companies Interview C++ Solved Questions PART - 2UGC-NET, GATE and all IT Companies Interview C++ Solved Questions PART - 2
UGC-NET, GATE and all IT Companies Interview C++ Solved Questions PART - 2Knowledge Center Computer
 
200 mcq c++(Ankit dubey)
200 mcq c++(Ankit dubey)200 mcq c++(Ankit dubey)
200 mcq c++(Ankit dubey)Ankit Dubey
 
C# programming constructors
C# programming  constructorsC# programming  constructors
C# programming constructors성진 원
 
Std 12 computer chapter 8 classes and objects in java important MCQs
Std 12 computer chapter 8 classes and objects in java important MCQsStd 12 computer chapter 8 classes and objects in java important MCQs
Std 12 computer chapter 8 classes and objects in java important MCQsNuzhat Memon
 
C++ 260 MCQ Question with Answer for all Units
C++ 260 MCQ Question with Answer for all UnitsC++ 260 MCQ Question with Answer for all Units
C++ 260 MCQ Question with Answer for all UnitsANUSUYA S
 
Kality CS Model_Exit_Exams_with_answer - Copy (2).doc
Kality CS Model_Exit_Exams_with_answer - Copy (2).docKality CS Model_Exit_Exams_with_answer - Copy (2).doc
Kality CS Model_Exit_Exams_with_answer - Copy (2).docAnimutGeremew3
 
OOM MCQ Dev by Prof PL Pradhan TGPCET, NAGPUR
OOM MCQ Dev by Prof PL Pradhan TGPCET, NAGPUROOM MCQ Dev by Prof PL Pradhan TGPCET, NAGPUR
OOM MCQ Dev by Prof PL Pradhan TGPCET, NAGPURlochan100
 
QUESTION 1A business system is a(n)A.collection of operations .pdf
QUESTION 1A business system is a(n)A.collection of operations .pdfQUESTION 1A business system is a(n)A.collection of operations .pdf
QUESTION 1A business system is a(n)A.collection of operations .pdffeelinggifts
 
this pdf very much useful for embedded c programming students
this pdf very much useful for embedded c programming studentsthis pdf very much useful for embedded c programming students
this pdf very much useful for embedded c programming studentspavan81088
 
FNT Software Solutions Placement Papers - Android
FNT Software Solutions Placement Papers - AndroidFNT Software Solutions Placement Papers - Android
FNT Software Solutions Placement Papers - Androidfntsofttech
 
Multiple choice questions for Java io,files and inheritance
Multiple choice questions for Java io,files and inheritanceMultiple choice questions for Java io,files and inheritance
Multiple choice questions for Java io,files and inheritanceAbishek Purushothaman
 
Demo question for android
Demo question for androidDemo question for android
Demo question for androidilias ahmed
 

Similar a PART - 1 Cpp programming Solved MCQ (20)

Part - 2 Cpp programming Solved MCQ
Part - 2  Cpp programming Solved MCQ Part - 2  Cpp programming Solved MCQ
Part - 2 Cpp programming Solved MCQ
 
C++ questions
C++ questionsC++ questions
C++ questions
 
UGC-NET, GATE and all IT Companies Interview C++ Solved Questions PART - 2
UGC-NET, GATE and all IT Companies Interview C++ Solved Questions PART - 2UGC-NET, GATE and all IT Companies Interview C++ Solved Questions PART - 2
UGC-NET, GATE and all IT Companies Interview C++ Solved Questions PART - 2
 
200 mcq c++(Ankit dubey)
200 mcq c++(Ankit dubey)200 mcq c++(Ankit dubey)
200 mcq c++(Ankit dubey)
 
C# programming constructors
C# programming  constructorsC# programming  constructors
C# programming constructors
 
Std 12 computer chapter 8 classes and objects in java important MCQs
Std 12 computer chapter 8 classes and objects in java important MCQsStd 12 computer chapter 8 classes and objects in java important MCQs
Std 12 computer chapter 8 classes and objects in java important MCQs
 
C++ 260 MCQ Question with Answer for all Units
C++ 260 MCQ Question with Answer for all UnitsC++ 260 MCQ Question with Answer for all Units
C++ 260 MCQ Question with Answer for all Units
 
Kality CS Model_Exit_Exams_with_answer - Copy (2).doc
Kality CS Model_Exit_Exams_with_answer - Copy (2).docKality CS Model_Exit_Exams_with_answer - Copy (2).doc
Kality CS Model_Exit_Exams_with_answer - Copy (2).doc
 
OOM MCQ Dev by Prof PL Pradhan TGPCET, NAGPUR
OOM MCQ Dev by Prof PL Pradhan TGPCET, NAGPUROOM MCQ Dev by Prof PL Pradhan TGPCET, NAGPUR
OOM MCQ Dev by Prof PL Pradhan TGPCET, NAGPUR
 
Java Programming.pdf
Java Programming.pdfJava Programming.pdf
Java Programming.pdf
 
Part - 3 Cpp programming Solved MCQ
Part - 3 Cpp programming Solved MCQ  Part - 3 Cpp programming Solved MCQ
Part - 3 Cpp programming Solved MCQ
 
QUESTION 1A business system is a(n)A.collection of operations .pdf
QUESTION 1A business system is a(n)A.collection of operations .pdfQUESTION 1A business system is a(n)A.collection of operations .pdf
QUESTION 1A business system is a(n)A.collection of operations .pdf
 
ASSIGNMENT
ASSIGNMENTASSIGNMENT
ASSIGNMENT
 
this pdf very much useful for embedded c programming students
this pdf very much useful for embedded c programming studentsthis pdf very much useful for embedded c programming students
this pdf very much useful for embedded c programming students
 
FNT Software Solutions Placement Papers - Android
FNT Software Solutions Placement Papers - AndroidFNT Software Solutions Placement Papers - Android
FNT Software Solutions Placement Papers - Android
 
ML-MCQ.pdf
ML-MCQ.pdfML-MCQ.pdf
ML-MCQ.pdf
 
Multiple choice questions for Java io,files and inheritance
Multiple choice questions for Java io,files and inheritanceMultiple choice questions for Java io,files and inheritance
Multiple choice questions for Java io,files and inheritance
 
FP 301 OOP FINAL PAPER
FP 301 OOP FINAL PAPER FP 301 OOP FINAL PAPER
FP 301 OOP FINAL PAPER
 
Demo question for android
Demo question for androidDemo question for android
Demo question for android
 
Java Quiz
Java QuizJava Quiz
Java Quiz
 

Más de Knowledge Center Computer

Programming languages java, python, sql and compare between c and python
Programming languages  java, python, sql and compare between c and pythonProgramming languages  java, python, sql and compare between c and python
Programming languages java, python, sql and compare between c and pythonKnowledge Center Computer
 
Information assistant exam complete syllabus 2018
Information assistant exam  complete syllabus  2018Information assistant exam  complete syllabus  2018
Information assistant exam complete syllabus 2018Knowledge Center Computer
 

Más de Knowledge Center Computer (20)

APS PGT Computer Science SylIabus
APS PGT Computer Science SylIabusAPS PGT Computer Science SylIabus
APS PGT Computer Science SylIabus
 
Specialization and generalization quizz
Specialization and generalization quizzSpecialization and generalization quizz
Specialization and generalization quizz
 
Data structure part 3
Data structure part  3Data structure part  3
Data structure part 3
 
Data structure part 4
Data structure part  4Data structure part  4
Data structure part 4
 
Data structure part 2
Data structure part  2Data structure part  2
Data structure part 2
 
Data structure part 1
Data structure part  1Data structure part  1
Data structure part 1
 
Computer architecture PART 2
Computer architecture  PART  2Computer architecture  PART  2
Computer architecture PART 2
 
Computer architecture PART 1
Computer architecture  PART 1Computer architecture  PART 1
Computer architecture PART 1
 
Course design class 12 ip
Course design class 12 ipCourse design class 12 ip
Course design class 12 ip
 
CBSE 12 ip 2018 sample paper
CBSE 12 ip 2018 sample paperCBSE 12 ip 2018 sample paper
CBSE 12 ip 2018 sample paper
 
Programming languages java, python, sql and compare between c and python
Programming languages  java, python, sql and compare between c and pythonProgramming languages  java, python, sql and compare between c and python
Programming languages java, python, sql and compare between c and python
 
Sql and Sql commands
Sql and Sql commandsSql and Sql commands
Sql and Sql commands
 
E commerce and types
E commerce and typesE commerce and types
E commerce and types
 
Android Operating System(OS)
Android Operating System(OS)Android Operating System(OS)
Android Operating System(OS)
 
Networking Basic MCQ's TEST
Networking Basic  MCQ's TESTNetworking Basic  MCQ's TEST
Networking Basic MCQ's TEST
 
Physics QUIZ
Physics QUIZ Physics QUIZ
Physics QUIZ
 
Ms word mcq
Ms word mcqMs word mcq
Ms word mcq
 
Ms word mcq
Ms word mcqMs word mcq
Ms word mcq
 
Information assistant exam complete syllabus 2018
Information assistant exam  complete syllabus  2018Information assistant exam  complete syllabus  2018
Information assistant exam complete syllabus 2018
 
Computer fundamentals in hindi
Computer fundamentals in hindiComputer fundamentals in hindi
Computer fundamentals in hindi
 

Último

VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Bookingdharasingh5698
 
KubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlyKubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlysanyuktamishra911
 
AKTU Computer Networks notes --- Unit 3.pdf
AKTU Computer Networks notes ---  Unit 3.pdfAKTU Computer Networks notes ---  Unit 3.pdf
AKTU Computer Networks notes --- Unit 3.pdfankushspencer015
 
Thermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - VThermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - VDineshKumar4165
 
Intro To Electric Vehicles PDF Notes.pdf
Intro To Electric Vehicles PDF Notes.pdfIntro To Electric Vehicles PDF Notes.pdf
Intro To Electric Vehicles PDF Notes.pdfrs7054576148
 
chapter 5.pptx: drainage and irrigation engineering
chapter 5.pptx: drainage and irrigation engineeringchapter 5.pptx: drainage and irrigation engineering
chapter 5.pptx: drainage and irrigation engineeringmulugeta48
 
UNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its PerformanceUNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its Performancesivaprakash250
 
Block diagram reduction techniques in control systems.ppt
Block diagram reduction techniques in control systems.pptBlock diagram reduction techniques in control systems.ppt
Block diagram reduction techniques in control systems.pptNANDHAKUMARA10
 
Top Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoor
Top Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoorTop Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoor
Top Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoordharasingh5698
 
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Bookingdharasingh5698
 
data_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdfdata_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdfJiananWang21
 
Unit 2- Effective stress & Permeability.pdf
Unit 2- Effective stress & Permeability.pdfUnit 2- Effective stress & Permeability.pdf
Unit 2- Effective stress & Permeability.pdfRagavanV2
 
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Call Girls in Nagpur High Profile
 
Call Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance BookingCall Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance Bookingroncy bisnoi
 

Último (20)

VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
 
KubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlyKubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghly
 
AKTU Computer Networks notes --- Unit 3.pdf
AKTU Computer Networks notes ---  Unit 3.pdfAKTU Computer Networks notes ---  Unit 3.pdf
AKTU Computer Networks notes --- Unit 3.pdf
 
NFPA 5000 2024 standard .
NFPA 5000 2024 standard                                  .NFPA 5000 2024 standard                                  .
NFPA 5000 2024 standard .
 
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
 
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar ≼🔝 Delhi door step de...
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar  ≼🔝 Delhi door step de...Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar  ≼🔝 Delhi door step de...
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar ≼🔝 Delhi door step de...
 
FEA Based Level 3 Assessment of Deformed Tanks with Fluid Induced Loads
FEA Based Level 3 Assessment of Deformed Tanks with Fluid Induced LoadsFEA Based Level 3 Assessment of Deformed Tanks with Fluid Induced Loads
FEA Based Level 3 Assessment of Deformed Tanks with Fluid Induced Loads
 
Thermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - VThermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - V
 
Intro To Electric Vehicles PDF Notes.pdf
Intro To Electric Vehicles PDF Notes.pdfIntro To Electric Vehicles PDF Notes.pdf
Intro To Electric Vehicles PDF Notes.pdf
 
chapter 5.pptx: drainage and irrigation engineering
chapter 5.pptx: drainage and irrigation engineeringchapter 5.pptx: drainage and irrigation engineering
chapter 5.pptx: drainage and irrigation engineering
 
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort ServiceCall Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
 
UNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its PerformanceUNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its Performance
 
Block diagram reduction techniques in control systems.ppt
Block diagram reduction techniques in control systems.pptBlock diagram reduction techniques in control systems.ppt
Block diagram reduction techniques in control systems.ppt
 
Top Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoor
Top Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoorTop Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoor
Top Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoor
 
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
 
data_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdfdata_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdf
 
Unit 2- Effective stress & Permeability.pdf
Unit 2- Effective stress & Permeability.pdfUnit 2- Effective stress & Permeability.pdf
Unit 2- Effective stress & Permeability.pdf
 
Call Girls in Netaji Nagar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Netaji Nagar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort ServiceCall Girls in Netaji Nagar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Netaji Nagar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
 
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
 
Call Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance BookingCall Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance Booking
 

PART - 1 Cpp programming Solved MCQ

  • 1. C++ Programming Questions Useful for all Companies Interviews, UGC-NET, GATE EXAM PART- 1
  • 2. 1. How any types of linkage are there in c++? a) 1 b) 2 c) 3 d) 4 View Answer Answer:c 2. To use internal linkage we have to use which keyword? a) static b) extern c) static or extern d) none of the mentioned View Answer Answer:a
  • 3. 3. Which one is used to refer to program elements in any translation units? a) internal linkage b) external linkage c) no linkage d) none of the mentioned View Answer Answer:b . What is the defualt type oof linkage that are available for identifires? a) internal b) external c) no linkage d) none of the mentioned View Answer Answer:b
  • 4. . Pick out the other definition of objects. a) member of the class b) associate of the class c) attribute of the class d) instance of the class View Answer Answer:d Explanation:None. 7. How many objects can present in a single class? a) 1 b) 2 c) 3 d) as many as possible View Answer Answer:d
  • 5. To use external linkage we have to use which keyword? a) static b) extern c) const d) none of the mentioned View Answer Answer:b Explanation:extern keyword is used to represent identifiers from other programs. 7. Which is used to use a function from one source file to another? a) code b) declaration c) prototype d) none of the mentioned View Answer Answer:c
  • 6. Which is used to define the member of a class externally? a) : b) :: c) # d) none of the mentioned View Answer Answer:b Explanation:None. 4. Which other keywords are also used to declare the class other than class? a) struct b) union c) object d) both a & b View Answer Answer:d
  • 7. 8. What is the use of no linkage? a) make the entity visible to other programs b) make the entity visible to other blocks in the same program. c) make the entity visible only to that block d) none of the mentioned View Answer Answer:c Which of these following members are not accessed by using direct member access operator? a) public b) private c) protected d) Both b & c View Answer Answer:d
  • 8. 7. Which of the following is a valid class declaration? a) class A { int x; }; b) class B { } c) public class A { } d) object A { int x; }; View Answer Answer:a Explanation:None. 8. The fields in the class in c++ program are by default a) protected b) private c) public d) none of the mentioned View Answer Answer:b
  • 9. . Where does the object is created? a) class b) constructor c) destructor d) attributes View Answer Answer:a Explanation:In class only all the listed items except class will be declared. 2. How to access the object in the class? a) scope resolution operator b) ternary operator c) direct member access operator d) none of the mentioned View Answer Answer:c
  • 10. . What does your class can hold? a) data b) functions c) both a & b d) none of the mentioned View Answer Answer:C Explanation:The classes in c++ are used to manipulate both data and functions. 2. How many specifiers are present in access specifiers in class? a) 1 b) 2 c) 3 d) 4 View Answer Answer:c
  • 11. Explanation:None. 9. Constructors are used to a) initalize the objects b) construct the data members c) both a & b d) none of the mentioned View Answer Answer:a Explanation:Once the object is declared means, the constructor are also declared by default. 10. When struct is used instead of the keyword class means, what will happen in the program? a) access is public by default b) access is private by default c) access is protected by default d) none of the mentioned View Answer Answer:a
  • 12. What is the output of this program? 1.#include <iostream> 2.using namespace std; 3.int main() 4.{ 5.int i; 6.enum month { 7.JAN,FEB,MAR,APR,MAY,JUN,JUL,AUG,SEP,OCT,DEC 8.}; 9.for (i = JAN; i <= DEC; i++) 10.cout << i; 11.return 0; 12.} a) 012345678910 b) 0123456789 c) 01234567891011 d) none of the mentioned View Answer Answer:a
  • 13. . Which keyword is used to define the user defined data types? a) def b) union c) typedef d) type View Answer Answer:c Explanation:None. 2. Identify the correct statement. a) typedef does not create different types.It only creates synonyms of existing types. b) typedef create different types. c) both a & b d) none of the mentioned View Answer Answer:a
  • 14. 7. What is the syntax of user-defined data types? a) typedef_existing data type_new name b) typedef_new name_existing data type c) def_existing data type_new name d) none of the mentioned View Answer Answer:a Explanation:None. 8. How many types of user-defined data type are in c++? a) 1 b) 2 c) 3 d) 4 View Answer Answer:c
  • 15. What is the scope of typedef defined data types? a) inside that block only b) whole program c) outside the program d) none of the mentioned View Answer Answer:b Explanation:We are defining the user-defined data type to be availed only inside that program, if we want to use anywhere means we have to define those types in the header file. 10. How many types of models are available to create the user-defined data type? a) 1 b) 2 c) 3 d) 4 View Answer Answer:b
  • 16. . Pick the other name of operator function. a) function overloading b) operator overloading c) member overloading d) None of the mentioned View Answer Answer:b Explanation:None. 2. Which of the following operators can’t be overloaded? a) :: b) + c) – d) [] View Answer Answer:a
  • 17. . How to declare operator function? a) operator operator sign b) operator c) operator sign d) None of the mentioned View Answer Answer:a How many real types are there in complex numbers? a) 1 b) 2 c) 3 d) 4 View Answer Answer:c
  • 18. . Which of the following statements is NOT valid about operator overloading? a) Only existing operators can be overloaded. b) Overloaded operator must have at least one operand of its class type. c) The overloaded operators follow the syntax rules of the original operator. d) None of the mentioned View Answer Answer:d Explanation:None. 9. Operator overloading is a) making c++ operator works with objects b) giving new meaning to existing operator c) making new operator d) both a & b View Answer Answer:d
  • 19. . Which header file is used to declare the complex number? a) complexnum b) complex c) complexnumber d) None of the mentioned View Answer Answer:b Explanation:None. 2. How to declare the complex number? a) (3,4) b) complex(3,4) c) (3,4i) d) None of the mentioned View Answer Answer:b
  • 20. Which of the following is not a function of complex values? a) real b) imag c) norm d) cartesian View Answer Answer:d How many parameters does a conversion operator may take? a) 0 b) 1 c) 2 d) as many as possible View Answer Answer:a
  • 21. 1. What is the return type of the conversion operator? a) void b) int c) float d) no return type View Answer Answer:d Explanation:Conversion operator doesn’t have any return type not even void. 2. Why we use the “dynamic_cast” type conversion? a) result of the type conversion is a valid b) to be used in low memory c) result of the type conversion is a invalid d) None of the mentioned View Answer Answer:a
  • 22. . How types are there in user defined conversion? a) 1 b) 2 c) 3 d) 4 View Answer Answer:b Explanation:There are two types of user- defined conversions.They are conversion by constructor, Conversion functions. 10. Pick out the correct syntax of operator conversion. a) operator float()const b) operator float() c) operator const d) None of the mentioned View Answer Answer:a
  • 23. Which rule will not affect the friend function? a) private and protected members of a class cannot be accessed from outside b) private and protected member can be accessed anywhere c) both a & b d) None of the mentioned View Answer Answer:a Explanation:Friend is used to access private and protected members of a class from outside the same class. 2. Which keyword is used to declare the friend function? a) firend b) friend c) classfriend d) myfriend View Answer Answer:b
  • 24. 3. What is the syntax of friend function? a) friend class1 Class2; b) friend class; c) friend class d) None of the mentioned View Answer Answer:a 3. What will happen when the function call operator is overloaded? a) It will not modify the functions. b) It will modify the functions. c) It will modify the object. d) It will modify the operator to be interpreted. View Answer Answer:d
  • 25. 9. Pick out the correct statement. a) A friend function may be a member of another class. b) A friend function may not be a member of another class. c) A friend function may or may not be a member of another class. d) None of the mentioned View Answer Answer:c Explanation:None. 10. Where does keyword ‘friend’ should be placed? a) function declaration b) function definition c) main function d) None of the mentioned View Answer Answer:a
  • 26. . What is the use of function call operator? a) overloading the methods b) overloading the objects c) overloading the parameters d) none of the mentioned View Answer Answer:b Explanation:None. 2. Pick out the correct statement. a) virtual functions does not give the ability to write a templated function. b) virtual functions does not give the ability to rewrite a templated function. c) virtual functions does give the ability to write a templated function. d) none of the mentioned View Answer Answer:a