33.
What happens if we run the following code in both C and C++?
#include<stdio.h>
struct STRUCT
{
  int a;
  int func()
  {
      printf("HELLO THIS IS STRUCTURE\n");
  }
};
int main()
{
  struct STRUCT s;
  s.func();
  return 0;
}

34.
What happens if the following code is compiled on both C and C++?
#include<stdio.h>
struct STRUCT
{
private:
	int a;
};
int main()
{
	printf("%d\n", (int)sizeof(struct STRUCT));
	return 0;
}

35.
What happens if the following program is executed in C and C++?
#include <stdio.h> 
int main(void) 
{ 
	const int j = 20; 
	int *ptr = &j;
	printf("*ptr: %d\n", *ptr); 
	return 0; 
}

36.
Which of the following C++ code will give error on compilation?
================code 1=================
#include <iostream>
using namespace std;
int main(int argc, char const *argv[])
{
	cout<<"Hello World";
	return 0;
}
========================================
================code 2=================
#include <iostream>
int main(int argc, char const *argv[])
{
	std::cout<<"Hello World";
	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.