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.
β
Correct Answer: (C)
runtime storage
Q. What is relationship between reliability and failure?
β
Correct Answer: (D)
varying relation depending upon the situation
Q. #include <stdio.h>
#define count 10;
void main()
{
printf("%d", count);
}
β
Correct Answer: (B)
syntax error
Q. When variable used in the program is a whole number,then variable is stored as ___________.
β
Correct Answer: (B)
integer data type
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;
}
β
Correct Answer: (C)
syntax error
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;
}
β
Correct Answer: (B)
3 4 5 6 7
Q. Which size should be used when double precision is required?
β
Correct Answer: (B)
double
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;
}
β
Correct Answer: (B)
non matching
Jump to