Imperative Programming MCQs
1) C programming was originally design for ____________ OS.
A) MACOS B) Windows C) Unix D)Android
Correct Ans: Unix
2) _____________ symbol represent start point and end point in flowchart.
A) Terminal B) Processing C) Decision D) offpage connector
Correct Ans: Terminal
3) In C, ____________ function is use to start the program execution.
A) start() B) getch() C) clrscr() D) main()
Correct Ans: main()
4) ____________ are used for to declare variables or functions in C.
A) tokens B) keywords C) identifiers D) data types
Correct Ans: data types
5) If function doesn't have any parameter then they can accept as a ___________.
A) void B) string C) int D) float
Correct Ans: Void
6) An _________ literal can be a decimal, octal, or hexadecimal constant.
A) char B) integer C) string D) float
Correct Ans: integer
7) when __________ is used as data member, it creates one copy of that member to be shared by all objects of its class.
A) constant B) keywords C) static D)dynamic
Correct Ans: static
8) ____________ operator checks either the values of two operands are equal or not.
A) != B) == C) <= D) >=
Correct Ans: ==
9) A _____________ statement allows a variable to be tested for similarity against a number of list values.
A) switch B) if__else C) nested if D) if__else__if
Correct Ans: switch
10) When the __________ statement execute in a loop, the loop is terminated immediately and program resumes at the next statement following the loop.
A) continue B) break C) pass D) goto
Correct Ans: break
11) If variables are declared inside a function, are called as ___________ variables.
A) global B) instant C) local D) static
Correct Ans: local
12) Variable is nothing but memory location and every memory location has __________.
A) address B) value C) constant D) identifier
Correct Ans: address
13) In C, _____________ are used to keep records, for example if you want to keep track of your students in one class.
A)pointer B)array C) Structures D) Union
Correct Ans: Structures
14) A ___________ is a special data type in C, use to store different data types in the same memory location.
A) union B)pointer C)array D) Structures
Correct Ans: union
15) type name[size][size1]...[sizeN]; is a syntax of ____________.
A) One-dimensional Arrays B) two-dimensional Arrays
C) Multi-dimensional Arrays D) none of these
Correct Ans: Multi-dimensional Arrays
16) When a source code calls a ___________, program control is handled by called function.
A) array B) data type C) function D) variable
Correct Ans: function
17) The loop becomes ____________ loop when a condition will not becomes false.
A) infinite B) for C) while D) do_while
Correct Ans: infinite
18) ___________ loop gets execute at least one time.
A) nested for B) do_while C) while D) for
Correct Ans: do_while
19) The #include <filename> asks compiler to search for the __________ where system header files are saved.
A) filename B) directory C) files D) all of these
Correct Ans: directory
20) Preprocessor directives are use ___________ symbol to represent.
A) $ B) * C) # D) &
Correct Ans: #
This set of questions is great, there are other such as object-oriented and functional programming paradigm as well. I appreciate your efforts in writing this great post. Thank you for sharing this amazing article. Cracking the coding interview
ReplyDelete