WorksheetsBASIC PROGRAMMING
Total questions: 25
Worksheet time: 13mins
What is the smallest unit of data in a computer?
Byte
Bit
Word
Nibble
Which programming language is known as the "mother of all languages"?
Python
C
Java
COBOL
What does a compiler do?
Executes code line by line
Translates high-level code into machine language
Checks for runtime errors
Manages memory allocation
Which of the following is a logical operator in C?
&&
=
++
%
Which data structure uses Last-In-First-Out (LIFO)?
Queue
Stack
Linked List
Graph
What is the file extension of a C++ program?
.java
.c
.cpp
.py
Which keyword is used to declare a constant variable in C?
const
static
final
immutable
What does HTML stand for?
HyperText Markup Language
HyperTransfer Markup Language
HighText Machine Language
HyperTransfer Machine Language
What is the default value of an integer in Java?
1
-1
0
null
Which of the following is NOT a type of loop?
for
while
repeat-until
do-while
Which of the following is used to take input in Python?
scanf()
cin
input()
println
What does SQL stand for?
Simple Query Language
Structured Query Language
Sequential Query Language
Standard Query Language
Which operator is used for exponentiation in Python?
^
**
*
%
What is a function?
A block of code that performs a specific task
A reserved keyword
A type of variable
An operator
Which of the following is NOT a primitive data type in Java?
int
float
string
double
What does the return keyword do in a function?
Loops through a block of code
Exits the function and optionally passes back a value
Initializes a variable
Declares a function
Which command is used to compile a Java program?
java
javac
javadoc
run
Which of the following is an example of a derived data type in C?
int
char
array
float
What is the purpose of a pointer in C?
To store large data values
To point to the address of another variable
To manage I/O operations
To create arrays dynamically
Which of the following is used to represent a group of similar elements?
Structure
Array
Pointer
Enum
What is the default access modifier in Java?
Public
Private
Protected
Package-private
Which loop executes at least once, even if the condition is false?
for
while
do-while
foreach
What is the size of the int data type in C on most systems?
2 bytes
4 bytes
8 bytes
Depends on the compiler
What is the primary purpose of the main() function in C?
To declare variables
To serve as the entry point of the program
To execute loops
To include header files
What does the acronym OOP stand for?
Open Object Program
Object-Oriented Programming
Operational Output Process
Ordered Object Protocol
