0% found this document useful (0 votes)
3 views

Programming

The document consists of a series of questions and answers related to fundamental concepts in computer science and programming. Topics covered include definitions of programming terms, data types, control structures, and programming paradigms. It serves as a quiz or review material for individuals learning about programming and computer science concepts.

Uploaded by

rajesh7991095
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views

Programming

The document consists of a series of questions and answers related to fundamental concepts in computer science and programming. Topics covered include definitions of programming terms, data types, control structures, and programming paradigms. It serves as a quiz or review material for individuals learning about programming and computer science concepts.

Uploaded by

rajesh7991095
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 17

1. What is a program in computer science?

a) A set of instructions that a computer follows 5. What does the acronym ASCII stand for?

b) A hardware component of a computer system a) American Standard Code for Information


Interchange
c) A type of software used for word processing
b) Advanced System Code for Internet Interface
d) A collection of data stored in a database
c) All-Purpose Scientific Code for Information

d) American Security Code for Internet Information


2. Which of the following is NOT a fundamental
programming concept?

a) Variables 6. What is an operator in programming?

b) Loops a) A symbol that performs a specific operation

c) Data mining b) A keyword used to define a variable

d) Conditional statements c) A type of loop used for iteration

d) A function that returns a value

3. What is a variable in programming?

a) A fixed value that cannot be changed 7. Which of the following is an arithmetic operator?

b) A named storage location in a computer's a) ==


memory
b) !=
c) A type of loop used for iteration
c) +
d) A function that performs a specific task
d) &&

4. Which of the following is a valid data type in most


programming languages? 8. What is a conditional statement used for?

a) Algorithm a) To repeat a block of code

b) Integer b) To execute a block of code only if a certain


condition is true
c) Flowchart
c) To define a variable
d) Pseudocode
d) To perform arithmetic operations

Plot No. - 215, Saheed Nagar, Bhubaneswar – 751007, Odisha, India


Contact: 9438734530, 9237424344
E-mail: [email protected],Website: www.questbbsr.org,Facebook: questbbsr24×7,App:QUEST BBSR
9. Which of the following is a type of conditional 13. What is a function in programming?
statement?
a) A variable that stores a value
a) For loop
b) A block of code that is executed repeatedly
b) While loop
c) A block of code that performs a specific task
c) If-else statement
d) A type of loop used for iteration
d) Function

14. What is the purpose of comments in code?


10. What is a loop in programming?
a) To be executed by the computer
a) A statement that defines a variable
b) To provide explanations for humans reading the
b) A block of code that is executed only once code

c) A block of code that is executed repeatedly c) To define variables

d) A function that returns a value d) To perform arithmetic operations

11. Which of the following is a type of loop? 15. What is syntax in programming?

a) If statement a) The logic of the program

b) Else statement b) The rules that govern the structure of a


programming language
c) While loop
c) The comments in the code
d) Switch statement
d) The output of the program

12. What is an array in programming?


16. What is debugging?
a) A single value stored in memory
a) Writing code
b) A collection of elements of the same data type
b) Testing code
c) A type of loop used for iteration
c) Finding and fixing errors in code
d) A function that performs a specific task
d) Compiling code

Plot No. - 215, Saheed Nagar, Bhubaneswar – 751007, Odisha, India


Contact: 9438734530, 9237424344
E-mail: [email protected],Website: www.questbbsr.org,Facebook: questbbsr24×7,App:QUEST BBSR
d) The process of executing machine code

17. What is an algorithm?

a) A computer program 21. What is interpretation?

b) A step-by-step procedure for solving a problem a) The process of translating source code into
machine code all at once
c) A type of data structure
b) The process of translating and executing source
d) A programming language
code line by line

c) The process of finding and fixing errors in code


18. What is pseudocode?
d) The process of writing code
a) Actual code written in a specific programming
language
22. Which of the following is NOT a basic control
b) A high-level description of an algorithm using a structure in programming?
combination of English and programming-like syntax
a) Sequence
c) A type of flowchart
b) Selection
d) A compiled program
c) Iteration

d) Abstraction
19. What is a flowchart?

a) A programming language
23. What is a string in programming?
b) A graphical representation of an algorithm
a) A numerical data type
c) A type of data structure
b) A sequence of characters
d) A function in programming
c) A type of loop

d) A function that returns a value


20. What is compilation?

a) The process of writing code


24. What is concatenation?
b) The process of finding and fixing errors in code
a) Adding numbers together
c) The process of translating source code into
machine code b) Combining two or more strings

Plot No. - 215, Saheed Nagar, Bhubaneswar – 751007, Odisha, India


Contact: 9438734530, 9237424344
E-mail: [email protected],Website: www.questbbsr.org,Facebook: questbbsr24×7,App:QUEST BBSR
c) Subtracting numbers c) A single value stored in memory

d) Dividing numbers d) An ordered collection of elements

25. What is a data structure? 29. What is recursion?

a) A way of organizing and storing data a) A type of loop that iterates a specific number of
times
b) A type of loop
b) A function that calls itself
c) A function in programming
c) A way of defining variables
d) A programming language
d) A data structure

26. Which of the following is a common data


structure? 30. What is object-oriented programming (OOP)?

a) Boolean a) A programming paradigm based on functions

b) Float b) A programming paradigm based on objects

c) Array c) A type of loop

d) Operator d) A way of defining variables

27. What is a list in programming? 31. Which of the following is a core principle of OOP?

a) A single value stored in memory a) Procedural programming

b) An ordered collection of elements b) Functional programming

c) A type of loop used for iteration c) Encapsulation

d) A function that performs a specific task d) Structured programming

28. What is a dictionary in programming? 32. What is encapsulation?

a) A collection of key-value pairs a) The process of hiding data and methods within a
class
b) A type of loop

Plot No. - 215, Saheed Nagar, Bhubaneswar – 751007, Odisha, India


Contact: 9438734530, 9237424344
E-mail: [email protected],Website: www.questbbsr.org,Facebook: questbbsr24×7,App:QUEST BBSR
b) The process of inheriting properties from a d) A function in programming
parent class

c) The ability of an object to take on many forms


36. What is an object in OOP?
d) The ability to define multiple functions with the
same name a) A blueprint for creating classes

b) An instance of a class

c) A type of loop
33. What is inheritance?

a) The process of hiding data and methods within a d) A function in programming


class

b) The process of inheriting properties from a 37. What is an interface in programming?


parent class
a) A class that cannot be instantiated
c) The ability of an object to take on many forms
b) A collection of abstract methods
d) The ability to define multiple functions with the
same name c) A type of loop

d) A way of defining variables

34. What is polymorphism?

a) The process of hiding data and methods within a 38. What is an abstract class?
class
a) A class that cannot be instantiated
b) The process of inheriting properties from a
b) A class that can be instantiated
parent class
c) A type of loop
c) The ability of an object to take on many forms
d) A way of defining variables
d) The ability to define multiple functions with the
same name

39. What is modularity in programming?


35. What is a class in OOP? a) Writing code in a single, large block
a) An instance of an object b) Breaking down a program into smaller, self-
contained modules
b) A blueprint for creating objects
c) Using only global variables
c) A type of loop

Plot No. - 215, Saheed Nagar, Bhubaneswar – 751007, Odisha, India


Contact: 9438734530, 9237424344
E-mail: [email protected],Website: www.questbbsr.org,Facebook: questbbsr24×7,App:QUEST BBSR
d) Ignoring code reusability c) Git

d) Debugger

40. What is code reusability?

a) Writing the same code multiple times 44. What is a compiler?

b) Writing code that can be used in different parts a) A program that translates source code into
of the program or in other programs machine code all at once

c) Using only global variables b) A program that translates and executes source
code line by line
d) Ignoring modularity
c) A program that finds and fixes errors in code

d) A program that writes code


41. What is a library in programming?

a) A collection of pre-written code that can be used


in a program 45. What is an interpreter?

b) A type of loop a) A program that translates source code into


machine code all at once
c) A function in programming
b) A program that translates and executes source
d) A programming language code line by line

c) A program that finds and fixes errors in code


42. What is version control? d) A program that writes code
a) A system for tracking changes to code over time

b) A way of writing code 46. What is a debugger?


c) A method for debugging code a) A program that translates source code into
d) A type of data structure machine code

b) A program that executes machine code

43. Which of the following is a popular version control c) A program that finds and fixes errors in code
system? d) A program that writes code
a) Compiler

b) Interpreter 47. What is an API?

Plot No. - 215, Saheed Nagar, Bhubaneswar – 751007, Odisha, India


Contact: 9438734530, 9237424344
E-mail: [email protected],Website: www.questbbsr.org,Facebook: questbbsr24×7,App:QUEST BBSR
a) Application Programming Interface 51. What is the output of the following code snippet
(assuming the programming language uses standard
b) Advanced Program Instruction arithmetic operators and integer division):
c) Automated Program Integration x = 10
y=3
d) Application Process Instruction
z=x/y
print(z)

48. What is a framework in programming? a) 3.33

a) A complete, ready-to-use application b) 3

b) A reusable, skeletal structure for building c) 3.0


applications
d) 10
c) A way of writing code

d) A method for debugging code


52. What is the output of the following code snippet
(assuming the programming language uses standard
comparison operators):
49. What is a paradigm in programming?
x=5
a) A set of programming languages y = 10
if x < y:
b) A style or approach to programming print("True")
else:
c) A type of data structure print("False")

d) A way of defining variables


a) True

b) False
50. Which of the following is a common programming
paradigm? c) 5

a) Hardware programming d) 10

b) System programming

c) Procedural programming 53. What type of loop is best suited for iterating
through a known number of elements?
d) Network programming
a) While loop

b) Do-while loop

Plot No. - 215, Saheed Nagar, Bhubaneswar – 751007, Odisha, India


Contact: 9438734530, 9237424344
E-mail: [email protected],Website: www.questbbsr.org,Facebook: questbbsr24×7,App:QUEST BBSR
c) For loop

d) If-else statement 57. What is the term for converting a value from one
data type to another?

a) Casting
54. What is the output of the following code snippet
(assuming the programming language uses zero-based b) Compiling
indexing for arrays):
c) Interpreting
my_array = [10, 20, 30, 40]
print(my_array[2]) d) Debugging

a) 10

b) 20 58. Which of the following is an example of casting?

c) 30 a) `int("123")`

d) 40 b) `print("Hello")`

c) `x = 5 + 3`

55. What is the purpose of the modulus operator (%) d) `if x > 0:`
in programming?

a) To perform division 59. What is a Boolean data type?


b) To find the remainder of a division a) A numerical data type
c) To multiply numbers b) A textual data type
d) To add numbers c) A data type that can have only two values: true or
false

56. What is the output of the following code snippet: d) A data type for storing large amounts of data

x = 15 % 4
print(x)
60. Which of the following is a valid Boolean value?
a) 3.75
a) 1
b) 1
b) 0
c) 3
c) "True"
d) 4
d) true

Plot No. - 215, Saheed Nagar, Bhubaneswar – 751007, Odisha, India


Contact: 9438734530, 9237424344
E-mail: [email protected],Website: www.questbbsr.org,Facebook: questbbsr24×7,App:QUEST BBSR
a) True
61. What is the output of the following code snippet
(assuming the programming language uses standard b) False
logical operators):
c) 1
x = True
y = False d) 0
z = x and y
print(z)
64. What is the term for a function that calls itself?
a) True
a) Iterative
b) False
b) Recursive
c) 1
c) Sequential
d) 0
d) Modular

62. What is the output of the following code snippet


(assuming the programming language uses standard 65. What is the benefit of using functions in
logical operators): programming?

x = True a) They make code longer and more complex


y = False
z = x or y b) They allow for code reusability and modularity
print(z)
c) They slow down program execution
a) True
d) They prevent code from being organized
b) False

c) 1
66. What is a parameter in a function?
d) 0
a) A value returned by the function

b) A variable that is passed into the function


63. What is the output of the following code snippet
(assuming the programming language uses standard c) A local variable within the function
logical operators):
d) A global variable
x = True
y = not x
print(y) 67. What is the return value of a function?

Plot No. - 215, Saheed Nagar, Bhubaneswar – 751007, Odisha, India


Contact: 9438734530, 9237424344
E-mail: [email protected],Website: www.questbbsr.org,Facebook: questbbsr24×7,App:QUEST BBSR
a) A value that is passed into the function

b) A value that the function sends back to the caller 71. Which of the following is an advantage of using
modular programming?
c) A local variable within the function
a) Increased code complexity
d) A global variable
b) Easier debugging and maintenance

c) Reduced code reusability


68. What is a local variable?
d) Increased code redundancy
a) A variable defined outside of any function

b) A variable defined within a function that is only


accessible within that function 72. What is the purpose of a header file in some
programming languages?
c) A variable that is passed into a function
a) To store the main program code
d) A variable that is accessible from any part of the
program b) To store function definitions and variable
declarations that can be used in multiple files

c) To store data
69. What is a global variable?
d) To execute the program
a) A variable defined within a function

b) A variable that is passed into a function


73. What is a pointer (in some programming
c) A variable defined outside of any function that is languages)?
accessible from any part of the program
a) A variable that stores a value
d) A variable that is only accessible within a specific
block of code b) A variable that stores the memory address of
another variable

c) A type of loop
70. What is the scope of a variable?
d) A function in programming
a) The data type of the variable

b) The value stored in the variable


74. What is memory allocation?
c) The region of the program where the variable is
accessible a) The process of writing code

d) The memory address of the variable

Plot No. - 215, Saheed Nagar, Bhubaneswar – 751007, Odisha, India


Contact: 9438734530, 9237424344
E-mail: [email protected],Website: www.questbbsr.org,Facebook: questbbsr24×7,App:QUEST BBSR
b) The process of assigning memory space to
variables or data structures
78. What is a tree (in computer science)?
c) The process of finding and fixing errors in code
a) A linear data structure
d) The process of executing code
b) A hierarchical data structure

c) A type of loop
75. What is a stack (in computer science)?
d) A function in programming
a) A type of data structure that follows the LIFO
(Last-In, First-Out) principle
79. What is a graph (in computer science)?
b) A type of data structure that follows the FIFO
(First-In, First-Out) principle a) A linear data structure
c) A type of loop b) A hierarchical data structure
d) A function in programming c) A data structure consisting of nodes and edges

d) A type of loop
76. What is a queue (in computer science)?

a) A type of data structure that follows the LIFO 80. What is searching (in computer science)?
(Last-In, First-Out) principle
a) The process of sorting data
b) A type of data structure that follows the FIFO
(First-In, First-Out) principle b) The process of finding a specific element in a data
structure
c) A type of loop
c) The process of deleting data
d) A function in programming
d) The process of inserting data

77. What is a linked list?


81. What is sorting (in computer science)?
a) A type of array
a) The process of searching for data
b) A linear data structure where elements are not
stored in contiguous memory locations b) The process of arranging data in a specific order

c) A type of loop c) The process of deleting data

d) A function in programming d) The process of inserting data

Plot No. - 215, Saheed Nagar, Bhubaneswar – 751007, Odisha, India


Contact: 9438734530, 9237424344
E-mail: [email protected],Website: www.questbbsr.org,Facebook: questbbsr24×7,App:QUEST BBSR
b) A way of expressing the worst-case time or space
complexity of an algorithm
82. Which of the following is a sorting algorithm?
c) A way of writing code
a) Binary search
d) A method for debugging code
b) Linear search

c) Bubble sort
86. What is a constant time complexity, represented
d) Depth-first search
in Big O notation?

a) O(n)
83. What is time complexity?
b) O(log n)
a) A measure of the amount of memory used by an c) O(1)
algorithm
d) O(n^2)
b) A measure of the amount of time taken by an
algorithm to run

c) A measure of the length of the code 87. What is a linear time complexity, represented in
Big O notation?
d) A measure of the number of lines of code
a) O(n)

b) O(log n)
84. What is space complexity?
c) O(1)
a) A measure of the amount of time taken by an
algorithm to run d) O(n^2)

b) A measure of the length of the code

c) A measure of the amount of memory used by an 88. What is a logarithmic time complexity,
algorithm represented in Big O notation?

d) A measure of the number of lines of code a) O(n)

b) O(log n)

85. What is Big O notation? c) O(1)

a) A way of expressing the exact runtime of an d) O(n^2)


algorithm

Plot No. - 215, Saheed Nagar, Bhubaneswar – 751007, Odisha, India


Contact: 9438734530, 9237424344
E-mail: [email protected],Website: www.questbbsr.org,Facebook: questbbsr24×7,App:QUEST BBSR
89. What is a quadratic time complexity, represented c) The ability of an object to take on many forms
in Big O notation?
d) The ability to define multiple functions with the
a) O(n) same name

b) O(log n)

c) O(1) 93. What is polymorphism?

d) O(n^2) a) The process of hiding data and methods within a


class

b) The process of inheriting properties from a parent


90. What is abstraction in programming? class
a) The process of hiding complex implementation c) The ability of an object to take on many forms
details and exposing only essential information
d) The ability to define multiple functions with the
b) The process of writing code same name
c) The process of finding and fixing errors in code

d) The process of executing code 94. What is a class in OOP?

a) An instance of an object
91. What is encapsulation? b) A blueprint for creating objects
a) The process of hiding data and methods within a c) A type of loop
class
d) A function in programming
b) The process of inheriting properties from a parent
class

c) The ability of an object to take on many forms 95. What is an object in OOP?

d) The ability to define multiple functions with the a) A blueprint for creating classes
same name
b) An instance of a class

c) A type of loop
92. What is inheritance?
d) A function in programming
a) The process of hiding data and methods within a
class

b) The process of inheriting properties from a parent 96. What is an interface in programming?
class

Plot No. - 215, Saheed Nagar, Bhubaneswar – 751007, Odisha, India


Contact: 9438734530, 9237424344
E-mail: [email protected],Website: www.questbbsr.org,Facebook: questbbsr24×7,App:QUEST BBSR
a) A class that cannot be instantiated a) A collection of pre-written code that can be used
in a program
b) A collection of abstract methods
b) A type of loop
c) A type of loop
c) A function in programming
d) A way of defining variables
d) A programming language

97. What is an abstract class?

a) A class that cannot be instantiated

b) A class that can be instantiated

c) A type of loop

d) A way of defining variables

98. What is modularity in programming?

a) Writing code in a single, large block

b) Breaking down a program into smaller, self-


contained modules

c) Using only global variables

d) Ignoring code reusability

99. What is code reusability?

a) Writing the same code multiple times

b) Writing code that can be used in different parts of


the program or in other programs

c) Using only global variables

d) Ignoring modularity

100. What is a library in programming?

Plot No. - 215, Saheed Nagar, Bhubaneswar – 751007, Odisha, India


Contact: 9438734530, 9237424344
E-mail: [email protected],Website: www.questbbsr.org,Facebook: questbbsr24×7,App:QUEST BBSR
• ANSWER SHEET
18. b) A high-level description of an algorithm
using a combination of English and
programming-like syntax
1. a) A set of instructions that a computer
follows 19. b) A graphical representation of an algorithm

2. c) Data mining 20. c) The process of translating source code into


machine code
3. b) A named storage location in a computer's
memory 21. b) The process of translating and executing
source code line by line
4. b) Integer
22. d) Abstraction
5. a) American Standard Code for Information
Interchange 23. b) A sequence of characters

6. a) A symbol that performs a specific operation 24. b) Combining two or more strings

7. c) + 25. a) A way of organizing and storing data

8. b) To execute a block of code only if a certain 26. c) Array


condition is true
27. b) An ordered collection of elements
9. c) If-else statement
28. a) A collection of key-value pairs
10. c) A block of code that is executed repeatedly
29. b) A function that calls itself
11. c) While loop
30. b) A programming paradigm based on objects
12. b) A collection of elements of the same data
31. c) Encapsulation
type
32. a) The process of hiding data and methods
13. c) A block of code that performs a specific
within a class
task
33. b) The process of inheriting properties from a
14. b) To provide explanations for humans
parent class
reading the code
34. c) The ability of an object to take on many
15. b) The rules that govern the structure of a
forms
programming language
35. b) A blueprint for creating objects
16. c) Finding and fixing errors in code
36. b) An instance of a class
17. b) A step-by-step procedure for solving a
problem 37. b) A collection of abstract methods

38. a) A class that cannot be instantiated

Plot No. - 215, Saheed Nagar, Bhubaneswar – 751007, Odisha, India


Contact: 9438734530, 9237424344
E-mail: [email protected],Website: www.questbbsr.org,Facebook: questbbsr24×7,App:QUEST BBSR
39. b) Breaking down a program into smaller, self- 59. c) A data type that can have only two values:
contained modules true or false

40. b) Writing code that can be used in different 60. d) true


parts of the program or in other programs
61. b) False
41. a) A collection of pre-written code that can be
used in a program 62. a) True

42. a) A system for tracking changes to code over 63. b) False


time 64. b) Recursive
43. c) Git 65. b) They allow for code reusability and
44. a) A program that translates source code into modularity
machine code all at once 66. b) A variable that is passed into the function
45. b) A program that translates and executes 67. b) A value that the function sends back to the
source code line by line caller
46. c) A program that finds and fixes errors in 68. b) A variable defined within a function that is
code only accessible within that function
47. a) Application Programming Interface 69. c) A variable defined outside of any function
48. b) A reusable, skeletal structure for building that is accessible from any part of the
applications program

70. c) The region of the program where the


49. b) A style or approach to programming
variable is accessible
50. c) Procedural programming
71. b) Easier debugging and maintenance
51. b) 3
72. b) To store function definitions and variable
52. a) True declarations that can be used in multiple files

53. c) For loop 73. b) A variable that stores the memory address
of another variable
54. c) 30
74. b) The process of assigning memory space to
55. b) To find the remainder of a division variables or data structures
56. c) 3 75. a) A type of data structure that follows the
57. a) Casting LIFO (Last-In, First-Out) principle

58. a) int("123") 76. b) A type of data structure that follows the


FIFO (First-In, First-Out) principle

Plot No. - 215, Saheed Nagar, Bhubaneswar – 751007, Odisha, India


Contact: 9438734530, 9237424344
E-mail: [email protected],Website: www.questbbsr.org,Facebook: questbbsr24×7,App:QUEST BBSR
77. b) A linear data structure where elements are 95. b) An instance of a class
not stored in contiguous memory locations
96. b) A collection of abstract methods
78. b) A hierarchical data structure
97. a) A class that cannot be instantiated
79. c) A data structure consisting of nodes and
edges 98. b) Breaking down a program into smaller, self-
contained modules
80. b) The process of finding a specific element in
a data structure 99. b) Writing code that can be used in different
parts of the program or in other programs
81. b) The process of arranging data in a specific
order 100. a) A collection of pre-written code
that can be used in a program
82. c) Bubble sort

83. b) A measure of the amount of time taken by


an algorithm to run

84. c) A measure of the amount of memory used


by an algorithm

85. b) A way of expressing the worst-case time or


space complexity of an algorithm

86. c) O(1)

87. a) O(n)

88. b) O(log n)

89. d) O(n^2)

90. a) The process of hiding complex


implementation details and exposing only
essential information

91. a) The process of hiding data and methods


within a class

92. b) The process of inheriting properties from a


parent class

93. c) The ability of an object to take on many


forms

94. b) A blueprint for creating objects

Plot No. - 215, Saheed Nagar, Bhubaneswar – 751007, Odisha, India


Contact: 9438734530, 9237424344
E-mail: [email protected],Website: www.questbbsr.org,Facebook: questbbsr24×7,App:QUEST BBSR

You might also like