Skip to content

Tag Archives: Misc C++

1. C++ : C++ was developed by Bjarne Stroustrup at Bell Labs since 1979 as an extension of the C language C++ is a general… Read More
#include<iostream> using namespace std; int main () {        int cin;        cin >> cin;        cout << "cin" << cin;        return 0; } Thanks to Gokul Kumar… Read More
#include<iostream> using namespace std;    int x[100]; int main() {     cout << x[99] << endl; } This question is contributed by Sudheendra Baliga (A) Unpredictable… Read More
Would destructor be called, if yes, then due to which vector? #include <iostream> #include <vector> using namespace std;    class a { public :     ~a()… Read More
How can we make a C++ class such that objects of it can only be created using new operator? If user tries to create an… Read More
Which of the following is true about inline functions and macros. (A) Inline functions do type checking for parameters, macros don’t (B) Macros are processed… Read More
Predict the output of following C++ program #include<iostream> using namespace std;    union A {   int a;   unsigned int b;   A() { a = 10;… Read More
#include<iostream> using namespace std; int x = 1; void fun() {     int x = 2;     {         int x = 3;         cout << ::x << endl;… Read More
Inline functions are useful when (A) Function is large with many nested loops (B) Function has many static variables (C) Function is small and we… Read More

Start Your Coding Journey Now!