Principles of Programming Languages MCQs | Page - 2

Dear candidates you will find MCQ questions of Principles of Programming Languages here. Learn these questions and prepare yourself for coming examinations and interviews. You can check the right answer of any question by clicking on any option or by clicking view answer button.

M

Mr. Dubey • 52.61K Points
Coach

Q. During execution of a program the compiler demands for block of memory to operating system.This block is called as _____________.

(A) code memory
(B) data memory
(C) runtime storage
(D) none of these
View Answer Discuss Share

M

Mr. Dubey • 52.61K Points
Coach

Q. What is relationship between reliability and failure?

(A) direct relationship
(B) inverse relationship
(C) no relation
(D) varying relation depending upon the situation
View Answer Discuss Share

M

Mr. Dubey • 52.61K Points
Coach

Q. #include <stdio.h>
#define count 10;
void main()
{
printf("%d", count);
}

(A) 10
(B) syntax error
(C) infinity
(D) none of these
View Answer Discuss Share

M

Mr. Dubey • 52.61K Points
Coach

Q. When variable used in the program is a whole number,then variable is stored as ___________.

(A) string data type
(B) integer data type
(C) negative whole number
(D) positive whole number
View Answer Discuss Share

M

Mr. Dubey • 52.61K Points
Coach

Q. Class is _______.

(A) template which associates code and data
(B) data abstraction
(C) implementation of abstract data type
(D) object oriented
View Answer Discuss Share

M

Mr. Dubey • 52.61K Points
Coach

Q. What will be the output of following code? #include <iostream> using namespace std;

int main()
{
enum color
{
blue, orange, green
};

enum fruit
{
apple, guava, orange
};

int i = 0;
for (i = blue; i <= green; i++)
printf("%d", i);
return 0;
}

(A) 0 1 2
(B) 1 2 3
(C) syntax error
(D) none of these
View Answer Discuss Share

M

Mr. Dubey • 52.61K Points
Coach

Q. What is the output of following code?
#include <iostream>
using namespace std;
int main()
{
int I;
enum test
{
a = 1, b, c, d, e, f, g, h
};

for (i = c; i <= g; i++) cout << " " << I;
return 0;
}

(A) syntax error
(B) 3 4 5 6 7
(C) 1 2 3 4 5
(D) none of these
View Answer Discuss Share

M

Mr. Dubey • 52.61K Points
Coach

Q. Which size should be used when double precision is required?

(A) float
(B) double
(C) long double
(D) none of these
View Answer Discuss Share

M

Mr. Dubey • 52.61K Points
Coach

Q. #include <iostream>
using namespace std;
int main()
{
float a = 22.22;
double b = 22.22;
if (a == b) cout << "Matching";
else cout << "Not Matching";
return 0;
}

(A) matching
(B) non matching
(C) syntax error
(D) none of these
View Answer Discuss Share

M

Mr. Dubey • 52.61K Points
Coach

Q. Explicit type conversion is known as_____.

(A) conversion
(B) casting
(C) separation
(D) none of these
View Answer Discuss Share

Jump to

Download our easy to use, user friendly Android App from Play Store. And learn MCQs with one click.

Image