73.
What will be the output of the following C++ code?
#include <iostream>
 
int main(int argc, char const *argv[])
{
	cout<<"Hello World";
	return 0;
}

75.
What happens if the following program is executed in C and C++?
#include <stdio.h> 
int main(void) 
{ 
	int new = 5;
	printf("%d", new); 
}

77.
What will be the output of the following C++ code?
#include <iostream>
using namespace std;
class Test
{
    static int x;
  public:
    Test() { x++; }
    static int getX() {return x;}
};
int Test::x = 0;
int main()
{
    cout << Test::getX() << " ";
    Test t[5];
    cout << Test::getX();
}

78.
What happens if the following program is executed in C and C++?
#include<stdio.h> 
int main() 
{ 
   foo();
}  
int foo() 
{ 
   printf("Hello"); 
   return 0;  
}

Read More Section(Introduction to C plus plus)

Each Section contains maximum 100 MCQs question on Introduction to C plus plus. To get more questions visit other sections.