106 C And C++ MCQ Questions in english हिन्दी

Share:

C and C++ are kinds of middle-level computer languages. Programming in C++, an object-oriented language, offers applications a distinct structure and encourages code reuse, which reduces development costs. Applications that can be converted to different platforms can be created using C++ because it is portable.  C++ is closer to the compiler and faster than C language. It is a statically typed programming language i.e it uses static typing when type checking is performed during compile-time as opposed to run time. Learning C++ is enjoyable and simple. C++ is a superset of the C language. Let's do a quiz about C and C++ Languages that will help you to level up your knowledge and prepare for exams.


What is the C++ wchar t size?

banner ad

What keyword does C++ use to define macros?

banner ad

What will the following C++ programme produce? #include using namespace std; class A{ public: A(){ cout<<"Constructor called\n"; } ~A(){ cout<<"Destructor called\n"; } }; int main(int argc, char const *argv[]) { A *a = new A[5]; delete[] a; return 0; }

What will the following C++ code snippet produce? #include #include using namespace std; int main () { int array[] = {0, 2, 4, 6, 7, 5, 3}; int n, result = 0; for (n = 0; n < 8; n++) { result += array[n]; } cout << result; return 0; }

What advantages do input and output in C++ have over those in C?

What will the following C++ code produce? #include using namespace std; int main () { int a, b, c; a = 2; b = 7; c = (a > b) ? a : b; cout << c; return 0; }

How do classes and structures differ in C++?

Which notion in C++ enables the reuse of previously created code?

What will the upcoming C++ program's output be? #include using namespace std; int main() { try { try { throw 20; } catch (int n) { cout << "Inner Catch\n"; throw; } } catch (int x) { cout << "Outer Catch\n"; } return 0; }

banner ad

What will the following C++ programme produce? #include using namespace std; int main() { int n = 5; void *p = &n; int *pi = static_cast(p); cout << *pi << endl; return 0; }

What distinguishes the C++ commands delete and delete[]?

What will the following C++ code produce? #include #include using namespace std; int main(int argc, char const *argv[]) { char s1[6] = "Hello"; char s2[6] = "World"; char s3[12] = s1 + " " + s2; cout<

What results from compiling and running the following C++ statement? int *ptr = NULL; delete ptr;

What does C++'s virtual inheritance mean?

Which of the following strategies does C++ employ?

Which of the following does C++'s Constructor class not include?

banner ad

Which of the following, in C++, is a proper identifier?

What user-defined header file extension is utilised in C++?

In C++, which of the following are used as comments?

Which of the following best describes the syntax for a C++ user defined header file inclusion?

Describe C++.

The creator of C++?

banner ad
×
Subscribe now

for Latest Updates

Articles, Jobs, MCQ and many more!