Introduction to Programming MCQs

Introduction to Programming MCQs

Our team has conducted extensive research to compile a set of Introduction to Programming MCQs. We encourage you to test your Introduction to Programming knowledge by answering these multiple-choice questions provided below.
Simply scroll down to begin!

1: True or False: Java is an Object Oriented language?

A.   False

B.   True

2: What is this called: var = (foo == bar) ? 'foo' : 'bar';

A.   Ternary operator

B.   Special operator

C.   Unary operator

D.   Boolean operator

3: In a flow chart, the symbol used for decision making is a ...

A.   diamond

B.   rectangle

C.   circle

D.   arrow

4: What is debugging a program?

A.   Introducing errors in the program to see how it holds up

B.   Testing the program

C.   Finding and fixing errors in your program.

D.   Usability Testing

5: Which of the following is NOT a key concept in object oriented programming?

A.   Looping

B.   Encapsulation

C.   Abstraction

D.   Inheritance

6: ______ is an identifier whose value cannot be altered by the program during execution.

A.   Attribute

B.   Variable

C.   Parameter

D.   Constant

7: Each pass through a loop is called a(n)...

A.   iteration

B.   culmination

C.   enumeration

D.   pass through

8: What is a "Matrix"?

A.   The real word

B.   A loop that includes variables

C.   A multi dimensional array

D.   An array with a list of values

9: Which of the following is NOT a common data type used in most languages?

A.   string

B.   boolean

C.   integer

D.   alphanumeric

10: What is an Array?

A.   A list of values

B.   A non changeable variable

C.   A large variable

11: What is an example of a "Scripting" Language?

A.   JavaScript

B.   C++

C.   Objective-C

D.   C#

12: When are "While" loops used?

A.   When we don't know how many times a loop has to run, but want it to run when a criteria is active

B.   To halt a program

C.   If you don't have space for a for loop

D.   To save memory

13: What does a compiler do?

A.   Nothing, it isn't used anymore

B.   Takes your programming language and converts it to machine readable code

C.   Takes a program and turns it into human readable code

D.   It packages your code in a .zip file

14: What does "!=" mean in Java?

A.   Not Equal

B.   True

C.   Equal

D.   False

15: Which of the following is a programming language?

A.   C++

B.   Pascal

C.   C#

D.   All of these

E.   Java

16: What does " == " check?

A.   Equality between two variables

B.   It prints out a variable

C.   The result of a code block

D.   The sum of two numbers

17: What is a GUI?

A.   Text based instructions

B.   A popular programming language

C.   A graphical user interface

D.   A Generic User Instruction

18: In Java, the return type of a function that does not return any value must be ____.

A.   int

B.   float

C.   double

D.   void

19: What digits are in Binary?

A.   0 and 1

B.   0, 1, 2, 3

C.   0 through 10

D.   0 through 5

20: In strongly typed languages, a variable must be ________ before it can be used.

A.   removed

B.   reset

C.   declared

D.   erased

21: When are "For loops" used?

A.   It is only used on non object-oriented languages

B.   When a value is equal

C.   To repeat code a known number of times

22: Which of the following is a value of a boolean data type?

A.   6

B.   -1

C.   text'

D.   False

23: How many bits are in a byte?

A.   2

B.   1024

C.   8

D.   100

24: What are "Nested" loops?

A.   A loop that assigns variables

B.   A loop within a loop

C.   A large "while" loop

D.   A large "for" loop

25: What is Programming?

A.   Using a computer for spreadsheets or word processing

B.   Controlling a computer with a mouse

C.   Provide (a computer or other machine) with coded instructions for the automatic performance of a particular task.

D.   Telling the computer what to do in human language

26: If an external object or program needs direct access to a variable in your class, you should declare it as a _______ variable.

A.   public

B.   protected

C.   inherited

D.   private

27: C++ is:

A.   procedure oriented

B.   object oriented

C.   none of these

D.   method oriented

28: A _______ is a computer program that transforms source code into another computer language; usually in order to create an executable program.

A.   Fourth-Generation Programming Language

B.   Compiler

C.   Debugger

D.   Third-Generation Programming Language

29: Which of the following is the starting index of an array in C++?

A.   1

B.   -1

C.   any number

D.   0

30: What does " = " do?

A.   It assigns a value to a variable

B.   It checks for equality

C.   It removes code from being executed

31: True or False: Java is a cross-platform language?

A.   False

B.   True

32: _______ is a programming paradigm that uses objects to contain data fields and associated programs called methods.

A.   web programming

B.   imperative programming

C.   object oriented programming

D.   procedural programming

33: In C++, what does the "%" operator do?

A.   Addition

B.   Modulo

C.   Multiplication

D.   Division

34: What does "||" mean in Java?

A.   OR

B.   IF

C.   AND

D.   NOT

35: True or False? Floats include decimals

A.   False

B.   True

36: Given the following code logic, when will statement 1 be executed? If (condition) then statement 1 else statement 2 end if

A.   When the condition is true.

B.   When the condition is true or false.

C.   Statement 1 will never be executed.

D.   When the condition is false.

37: Given a = true, b = false; what is the value returned by (a and b)?

A.   False

B.   1

C.   777

D.   887

38: A garbage collector does what?

A.   Cleans up garbage on the screen.

B.   Collects and disposes of junk email.

C.   Takes out your office garbage.

D.   Reclaims memory occupied by data that is no longer in use.

E.   Allocates memory for new objects.

39: The correct syntax of do-while loop is...

A.   do { statements; } while ( condition );

B.   ( condition) while; do { statements; };

C.   while ( condition ); do { statements; };

D.   { statements; } do-while();

40: Given the following code logic, when will statement 2 be executed? If (condition) then statement 1 else statement 2 end if

A.   Statement 2 will be executed when statement 1 is executed.

B.   When the condition is true or false.

C.   When the condition is true.

D.   When the condition is false.

41: Integer, boolean, and string are examples of a _________.

A.   data type

B.   variable

C.   object

D.   class

42: Which is more efficient?

A.   i = i + j;

B.   i += j;

43: A ________ variable refers directly to another value stored elsewhere in the computer memory using its address.

A.   pointer

B.   function

C.   class

D.   object

44: A precise sequence of steps to solve a problem is called a(n)...

A.   algorithm

B.   program

C.   statement

D.   routine

45: Which of the following is NOT a commonly used comparison operator?

A.   Equality

B.   Less than or equal to

C.   Assignment

D.   Greater than

46: Which of the following is NOT an Integrated Development Environment (IDE)?

A.   FrontPage

B.   Visual Studio

C.   Notepad

D.   DreamWeaver

47: && is a(n) ______ operator:

A.   unary

B.   logical

C.   arithmetic

D.   relational

48: ______ is a collection of data items of the same size and type that can be selected by indices computed at run-time.

A.   Method

B.   Array

C.   Function

D.   Object

49: How many decimal places are in an Integer?

A.   0

B.   3

C.   1

D.   2

50: Hiding internal data from external programs or objects and allowing access to it through only publicly declared methods is known as ___________.

A.   data protection

B.   data inheritance

C.   data encapsulation

D.   internal data