SlideShare ist ein Scribd-Unternehmen logo
1 von 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

Weitere ähnliche Inhalte

Was ist angesagt?

Mapping Cardinalities
Mapping CardinalitiesMapping Cardinalities
Mapping CardinalitiesMegha Sharma
 
200 mcq c++(Ankit dubey)
200 mcq c++(Ankit dubey)200 mcq c++(Ankit dubey)
200 mcq c++(Ankit dubey)Ankit Dubey
 
Fundamentals of Database Systems Questions and Answers
Fundamentals of Database Systems Questions and AnswersFundamentals of Database Systems Questions and Answers
Fundamentals of Database Systems Questions and AnswersOXUS 20
 
Programming in C Presentation upto FILE
Programming in C Presentation upto FILEProgramming in C Presentation upto FILE
Programming in C Presentation upto FILEDipta Saha
 
Function overloading and overriding
Function overloading and overridingFunction overloading and overriding
Function overloading and overridingRajab Ali
 
Object oriented programming c++
Object oriented programming c++Object oriented programming c++
Object oriented programming c++Ankur Pandey
 
Creating simple component
Creating simple componentCreating simple component
Creating simple componentpriya Nithya
 
Virtual base class
Virtual base classVirtual base class
Virtual base classTech_MX
 
Data members and member functions
Data members and member functionsData members and member functions
Data members and member functionsHarsh Patel
 
mini project in c using data structure
mini project in c using data structure mini project in c using data structure
mini project in c using data structure SWETALEENA2
 
Polymorphism in C++
Polymorphism in C++Polymorphism in C++
Polymorphism in C++Rabin BK
 

Was ist angesagt? (20)

Mapping Cardinalities
Mapping CardinalitiesMapping Cardinalities
Mapping Cardinalities
 
200 mcq c++(Ankit dubey)
200 mcq c++(Ankit dubey)200 mcq c++(Ankit dubey)
200 mcq c++(Ankit dubey)
 
Differences between c and c++
Differences between c and c++Differences between c and c++
Differences between c and c++
 
Introduction to c#
Introduction to c#Introduction to c#
Introduction to c#
 
Fundamentals of Database Systems Questions and Answers
Fundamentals of Database Systems Questions and AnswersFundamentals of Database Systems Questions and Answers
Fundamentals of Database Systems Questions and Answers
 
Inheritance
InheritanceInheritance
Inheritance
 
Programming in C Presentation upto FILE
Programming in C Presentation upto FILEProgramming in C Presentation upto FILE
Programming in C Presentation upto FILE
 
Function overloading and overriding
Function overloading and overridingFunction overloading and overriding
Function overloading and overriding
 
07. Virtual Functions
07. Virtual Functions07. Virtual Functions
07. Virtual Functions
 
Object oriented programming c++
Object oriented programming c++Object oriented programming c++
Object oriented programming c++
 
Creating simple component
Creating simple componentCreating simple component
Creating simple component
 
Virtual base class
Virtual base classVirtual base class
Virtual base class
 
Context free grammar
Context free grammar Context free grammar
Context free grammar
 
Data members and member functions
Data members and member functionsData members and member functions
Data members and member functions
 
mini project in c using data structure
mini project in c using data structure mini project in c using data structure
mini project in c using data structure
 
Polymorphism in C++
Polymorphism in C++Polymorphism in C++
Polymorphism in C++
 
JAVA PROGRAMMING
JAVA PROGRAMMING JAVA PROGRAMMING
JAVA PROGRAMMING
 
Function overloading ppt
Function overloading pptFunction overloading ppt
Function overloading ppt
 
Meaning Of VB
Meaning Of VBMeaning Of VB
Meaning Of VB
 
Object oriented concepts
Object oriented conceptsObject oriented concepts
Object oriented concepts
 

Ähnlich wie 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
 
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
 
SBI IT (Systems) Assistant Manager Question Paper
SBI IT (Systems) Assistant Manager Question PaperSBI IT (Systems) Assistant Manager Question Paper
SBI IT (Systems) Assistant Manager Question PaperHarish Rawat
 

Ähnlich wie 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
 
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
 
SBI IT (Systems) Assistant Manager Question Paper
SBI IT (Systems) Assistant Manager Question PaperSBI IT (Systems) Assistant Manager Question Paper
SBI IT (Systems) Assistant Manager Question Paper
 

Mehr von 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
 

Mehr von 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
 

Kürzlich hochgeladen

(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...ranjana rawat
 
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
 
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Dr.Costas Sachpazis
 
Coefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxCoefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxAsutosh Ranjan
 
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service NashikCall Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service NashikCall Girls in Nagpur High Profile
 
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...Call Girls in Nagpur High Profile
 
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
UNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and workingUNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and workingrknatarajan
 
KubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlyKubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlysanyuktamishra911
 
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Christo Ananth
 
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSMANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSSIVASHANKAR N
 
Porous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingPorous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingrakeshbaidya232001
 
Booking open Available Pune Call Girls Pargaon 6297143586 Call Hot Indian Gi...
Booking open Available Pune Call Girls Pargaon  6297143586 Call Hot Indian Gi...Booking open Available Pune Call Girls Pargaon  6297143586 Call Hot Indian Gi...
Booking open Available Pune Call Girls Pargaon 6297143586 Call Hot Indian Gi...Call Girls in Nagpur High Profile
 
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
University management System project report..pdf
University management System project report..pdfUniversity management System project report..pdf
University management System project report..pdfKamal Acharya
 
Introduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxIntroduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxupamatechverse
 
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdfONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdfKamal Acharya
 

Kürzlich hochgeladen (20)

(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
 
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
 
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
 
Coefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxCoefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptx
 
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service NashikCall Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
 
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
 
(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 Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
 
UNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and workingUNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and working
 
KubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlyKubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghly
 
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
 
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSMANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
 
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINEDJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
 
Porous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingPorous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writing
 
Booking open Available Pune Call Girls Pargaon 6297143586 Call Hot Indian Gi...
Booking open Available Pune Call Girls Pargaon  6297143586 Call Hot Indian Gi...Booking open Available Pune Call Girls Pargaon  6297143586 Call Hot Indian Gi...
Booking open Available Pune Call Girls Pargaon 6297143586 Call Hot Indian Gi...
 
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
University management System project report..pdf
University management System project report..pdfUniversity management System project report..pdf
University management System project report..pdf
 
Introduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxIntroduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptx
 
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdfONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
 

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