MCQs on C++

Ques 1

Raj. Informatics Assistant 2011

C++ मूल रूप से किसके द्वारा विकसित किया गया था?

C++ was originally developed by 

[A] Nicolas Wirth

[B] Donalt Knuth

[C] Bjarni Stroustrup 

[D] Ken Thompson

Correct Answer : Bjarni Stroustrup 


Ques 2

कीवर्ड friend प्रकट नहीं होता है

The keyword friend does not appear in

[A] The class allowing access to another class.

[B] The class desiring access to another class.

[C] The private section of a class.

[D] The public section of a class.

Correct Answer : The private section of a class.


Ques 3

UPPCL AE CS 2016

वह ऑपरेटर जिसे ओवरलोड नहीं किया जा सकता है

The operator that cannot be overloaded is

[A] %

[B] ::

[C] +

[D] -

Correct Answer : ::


Ques 4

बिना पैरामीटर वाले कंस्ट्रक्टर को क्या कहा जाता है?

The constructor without parameter is called?

[A] Method Constructor

[B] Default Constructor

[C] Operator Constructor

[D] Function Constructor

Correct Answer : Default Constructor


Ques 5

__________ एक विशेष विधि है जिसका उपयोग किसी वर्ग के इंस्टेंस वेरिएबल को प्रारंभ करने के लिए किया जाता है।

A __________ is a special method used to initialize the instance variable of a class.

[A] Member function

[B] Destructor

[C] Constructor

[D] Structure

Correct Answer : Constructor


Ques 6

Rajasthan Informatics Assistant 2011

C++ में, एक class के भीतर निहित एक फ़ंक्शन है:

In C++ , a function contained within a class is :

[A] A member function

[B] An operator

[C] A class function

[D] A method

Correct Answer : A member function


Ques 7

I A -2011

C++ में ऑपरेटर ओवरलोडिंग क्या है?

Operator overloading in C++ is?

[A] Making C++ operators work with objects

[B] Giving new meaning to existing C++ operators

[C] Making new C++ operators

[D] Both A and B

Correct Answer : Both A and B


Ques 8

I A -2011

C++ में, एक विध्वंसक लेता है

In C++ ,a destructor takes

[A] One argument

[B] Two argument

[C] Three argument

[D] zero argument

Correct Answer : zero argument


Ques 9

I A -2011

C++ में, एक क्लास में निहित फ़ंक्शन है:

In C++ , a function contained within a class is :

[A] A member function

[B] An operator

[C] A class function

[D] A method

Correct Answer : A member function


Ques 10

I A -2011

C++ प्रोग्राम के किसी क्लास में फ़ील्ड डिफ़ॉल्ट रूप से होते हैं

Field in a class of C++ Program are by default

[A] Private

[B] Public

[C] Protected

[D] None of the above

Correct Answer : Private


Ques 11

I A -2011

C++ में, 14%4 बराबर है -

In C++ , 14%4 equals to -

[A] 1

[B] 2

[C] 3

[D] 4

Correct Answer : 2


Ques 12

I A -2011

C++ मूलतः किसके द्वारा विकसित किया गया था?

C++ was originally developed by

[A] An object is declard

[B] An object is used

[C] A class is declared

[D] A class is used

Correct Answer : An object is declard


Ques 13

I A -2011

C++ में कन्स्ट्रक्टर को तब बुलाया जाता है जब भी

A constructor in C++ is called whenever

[A] An object is declared

[B] An object is used

[C] A class is declared

[D] class is used

Correct Answer : An object is declared


Ques 14

o level July -2022

नोटपैड++ किस भाषा में लिखा गया है?

Notepad++ is written in which language ?

[A] PHP

[B] Python

[C] C++

[D] Java

Correct Answer : C++


Ques 15

o level July -2022

सबलाइम टेक्स्ट एडिटर किस भाषा में लिखा गया है?

Sublime text editor is written in which language ?

[A] PHP

[B] Python

[C] C++

[D] Both B and C

Correct Answer : Both B and C


Ques 16

RBCI 2022

C++ द्वारा कितने प्रकार के बहुरूपता समर्थित हैं?

How many type of polymorphisms are supported by C++?

[A] 1

[B] 2

[C] 3

[D] 4

Correct Answer : 2


Ques 17

UCG NET CSA 2024

C++ में नियंत्रण स्ट्रिंग में वर्णों के तीन महत्वपूर्ण वर्गीकरण होते हैं

The control string in C++ consists of three important classifications of characters

[A] Escape sequence characters, Format specifiers and White space characters

[B] Special characters, White-space characters and Non-white space characters

[C] Format specifiers, White-space characters and Non-white space characters

[D] Special characters, White-space characters and Format specifiers

Correct Answer : Escape sequence characters, Format specifiers and White space characters


Ques 18

HPSSSB -2018

C++ भाषा में, किसी क्लास के भीतर मौजूद फ़ंक्शन को कहा जाता है

In C++ language, a function contained within a class is called a

[A] in-built function

[B] user defined function

[C] member function

[D] All of these

Correct Answer : member function


Ques 19

DSSSB TGT -2023

C++ भाषा में, निर्देश 'ignore(x,y):___________.

In C++ language , the instruction 'ignore(x,y):___________.

[A] Skips the last x characters and stops if characters y is encountered .

[B] Skips the first y characters and stops if characters x is encountered.

[C] Skips the first x characters and stops if character y is encountered.

[D] Skips the last y characters and stops if character x is encountered.

Correct Answer : Skips the first x characters and stops if character y is encountered.


Ques 20

DSSSB TGT -2021

C++ में main () फ़ंक्शन के संबंध में कौन सा कथन सही है? I. यह एक उपयोगकर्ता परिभाषित फ़ंक्शन है। II. यह एक पूर्व-परिभाषित फ़ंक्शन है।

Which statements is correct regarding main () function in C++? I. It is a user defined function. II. It is a pre-defined function.

[A] Neither I nor II

[B] Only II

[C] Both I and II

[D] Only I

Correct Answer : Only I


Ques 21

DSSSB TGT -2021

C++ कोड के निम्नलिखित खंड पर विचार करें। int j, n; for(j=1;j<=n; ) j=j*2; किसी भी n > 0 के लिए लूप के निष्पादन में की गई तुलनाओं की संख्या क्या है?

Consider the following segment of C++ code. int j, n; for(j=1;j<=n; ) j=j*2; What is the number of comparisons made in the execution of the loop for any n > 0?

[A] log2 (n + 1)

[B] . log2 n + 1

[C] n + 1

[D] (n + 1)/2

Correct Answer : . log2 n + 1


Ques 22

DSSSB TGT -2021

C++ में वह ऑपरेटर, जिसका उपयोग पॉइंटर का उपयोग करके किसी मान तक पहुंचने के लिए किया जाता है, ______ के रूप में जाना जाता है।

The operator in C++, which is used to access a value by using a pointer, is known as ______.

[A] direct operator

[B] Indirect Operator

[C] Indirection Operator

[D] Insertion Operator

Correct Answer : Indirection Operator


Ques 23

DSSSB TGT -2023

C++ मुख्य रूप से ___________ के लिए फ़ंक्शन कॉल ओवरहेड को कम करने के लिए इनलाइन फ़ंक्शन प्रदान करता है।

C++ provides inline functions to facilitate a reduced function call overhead mainly for ___________.

[A] Non-member functions

[B] Library functions

[C] Small functions

[D] Large functions

Correct Answer : Small functions


Ques 24

BELTRON-DEO- 2019

निम्नलिखित में से कौन सी पूर्णतया ऑब्जेक्ट ओरिएंटेड कंप्यूटर लैंग्वेज है?

Which of the following is a completely object-oriented computer language?

[A] MS-Office

[B] CSS

[C] C++

[D] HTML

Correct Answer : C++


Ques 25

joa-it-2019

कंपाइलर आपके C++ निर्देशों को परिवर्तित करता है

The compiler converts your C++ instructions into

[A] object code

[B] edited code

[C] source code

[D] translated code

Correct Answer : object code


Ques 26

[IBPS Clerk 2012]

C++ भाषा किसके द्वारा विकसित की गई है?

C+ + language developed by

[A] Dennis Ritchie

[B] Charles Babbage

[C] Niklaus Wirth

[D] Bjarne Stroustrup

Correct Answer : Bjarne Stroustrup


Ques 27

Tech Assistant -2019

Consider the following C++ program what is the output of this program ?

Consider the following C++ program what is the output of this program ?

int main() 
{
 int sal;
 sal 4+215; 
cout<<sal;
 return 0;
 }

[A] 35

[B] 34

[C] 90

[D] 219

Correct Answer : 219


Ques 28

Tech Assistant -2019

C++ में मैक्रोज़ को परिभाषित करने के लिए किस कीवर्ड का उपयोग किया जाता है?

Which keyword is used to define the macros in C++?

[A] Macro

[B] Define

[C] #define

[D] None of the mentioned

Correct Answer : #define


Ques 29

Tech Assistant -2019

A process executes the following code

A process executes the following code

for{i=0;i<p; i++)
{
fork();
}

[A] 1

[B] P

[C] 2P-1

[D] 2

Correct Answer : 2P-1


Ques 30

Tech Assistant -2019

निम्नलिखित C++ प्रोग्राम सेगमेंट का आउटपुट क्या है?

What is the output of the following C++ program segment ?

void check(int &arg1) 
{
 arg1-550: 
}
 int main() 
{
 int arg = 10; check(arg); 
cout<< "New value of arg is "<<arg; 
return 0;
 {

[A] New value of arg is 10

[B] New value of arg is 550

[C] New value of arg is 15

[D] New value of arg is 55

Correct Answer : New value of arg is 10


Ques 31

Tech Assistant -2019

C++ और Java में त्रुटि प्रबंधन के संदर्भ में, 'finally' के बारे में निम्नलिखित में से कौन सा सत्य है?

In the context of error handling in C++ and Java , which of the following is true about 'finally'?

[A] Finally block is mandatory

[B] I will be executed only if exception occurs

[C] It will be executed only if NO exception occurs

[D] It will be executed irrespective of execution occurrence

Correct Answer : It will be executed irrespective of execution occurrence


Ques 32

Tech Assistant -2019

C++ और Java में त्रुटि प्रबंधन के संदर्भ में, 'finally' के बारे में निम्नलिखित में से कौन सा सत्य है?

In the context of error handling in C++ and Java , which of the following is true about 'finally'?

[A] Finally block is mandatory

[B] It wll be executed only if exception occurs

[C] It will be executed only if no exception occurs

[D] It will be executed irrespective of exception occurrence

Correct Answer : It will be executed irrespective of exception occurrence


Ques 33

Tech Assistant -2019

C++ प्रोग्रामिंग भाषा में, cout एक है

In C++ programming language, cout is a

[A] Function

[B] Predefined object

[C] Pointer

[D] None of the above

Correct Answer : Predefined object


Ques 34

Tech Assistant -2019

C++ में, वह ऑपरेटर जिसे ओवरलोड नहीं किया जा सकता है, वह है

In C++, the operator that cannot be overloaded is

[A] +

[B] <

[C] &&

[D] ::

Correct Answer : ::


Ques 35

Tech Assistant -2019

C++ में, बिना किसी तर्क के एक कन्स्ट्रक्टर को कहा जाता है

In C++, a constructor without any arguments is called a

[A] Copy constructor

[B] Parameterised constructor

[C] Default constructor

[D] None of the above

Correct Answer : Default constructor


Ques 36

Tech Assistant -2019

C++ में, वर्चुअल फ़ंक्शन किसका उदाहरण है?

In C++,Virtual function is an example of

[A] Function overloading

[B] Compile time polymorphism

[C] Operator overloading

[D] Runtime polymorphism

Correct Answer : Runtime polymorphism


Ques 37

Tech Assistant -2019

निम्नलिखित कोड द्वारा कार्यान्वित सॉर्टिंग एल्गोरिदम की पहचान करें:

Identify the sorting algorithm implemented by the following code:

void f(int x[], int n)
{
Int i,j,temp;
for(i=0; i<n; i++)
{
for(j=0; j<(n-i-1); j++)
{
if (x[j] > x[j+1])
{
temp = x[j];
x[j] = x[j+1];
x[j+1] = temp;
}
}
}
}

[A] Quick sort

[B] Bubble sort

[C] Heap sort

[D] None of the above

Correct Answer : Bubble sort


Latest Updates