Top 150+ Solved Principles of Programming Languages MCQ Questions Answer
Q. Programming language FOTRAN stands for:
a. free translator
b. formula translator
c. formula translation
d. free translation
Q. The full form of BNF is_____________.
a. beginning normal form
b. backus naur form
c. best normal form
d. none of these
Q. Semantic of a program means-
a. format of a program
b. meaning of a program
c. simply content of a program
d. none of these
Q. What is the output of the following code? Int main(void) { char name='P'; 'P'=10;return 0; }
a. name will contain value 10
b. p will contain 10
c. syntax error
d. none of these
Q. Which of the following represents correct syntax for function declaration?
a. int sum(int,int);
b. int sum(int,int){}
c. int sum;
d. both a and c
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
Q. What is relationship between reliability and failure?
a. direct relationship
b. inverse relationship
c. no relation
d. varying relation depending upon the situation
Q. #include<stdio.h> #define count 10; void main() { printf("%d",count); }
a. 10
b. syntax error
c. infinity
d. none of these
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
Q. Class is _______.
a. template which associates code and data
b. data abstraction
c. implementation of abstract data type
d. object oriented
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
Q. Which size should be used when double precision is required?
a. float
b. double
c. long double
d. none of these
Q. What will be the output of the follwing code? #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
Q. Explicit type conversion is known as_____.
a. conversion
b. casting
c. separation
d. none of these