Font size
WorksheetsBim1
Total questions: 15
Worksheet time: 5mins
Which of the following is NOT a valid data type in C?
int
string
char
float
What is the syntax to declare a variable in C?
var_name data_type;
type var_name;
variable data_type;
data_type var_name;
What does the 'scanf' function do in C?
Clears the console screen
Reads input from the user
Prints output to the console
None of the above
Which of the following is the correct way to comment a single line in C?
-- Comment
# Comment
/* Comment */
// Comment
What is the purpose of the "sizeof" operator in C?
It returns the size of a pointer in bytes
It returns the size of a data type in bytes
It returns the size of a function in bytes
It returns the size of a variable in bytes
What is the correct way to initialize an array of integers in C?
int arr{}(1, 2, 3, 4, 5);
int arr{} = {1, 2, 3, 4, 5};
int arr() = {1, 2, 3, 4, 5};
int arr[] = {1, 2, 3, 4, 5};
Which keyword is used to define a constant in C?
(a)
Which function is used to print formatted output in C?
display()
printf()
console.log()
print()
Which of the following is not a programming language ?
HTML
Java
SQL
R
What is the correct way to declare a character array in C?
char arr{} = {'a', 'b', 'c'};
char arr() = {'a', 'b', 'c'};
char arr[] = {'a', 'b', 'c'};
char arr{}('a', 'b', 'c');
Which of the following is the correct way to include a header file in C?
#include <stdio.h>
include <stdio.h>
import <stdio.h>
require <stdio.h>
What is the purpose of the 'break' statement in a switch case in C?
To exit the loop immediately
To skip the current iteration
To jump to the next case
To exit the switch case block
Which component of a computer is responsible for storing data permanently?
GPU (Graphics Processing Unit)
HDD (Hard Disk Drive)
CPU (Central Processing Unit)
RAM (Random Access Memory)
What does USB stand for?
Universal Serial Bus
Uniform System Bus
Uninterruptible System Backup
User System Backup
'&' is used to perform 'AND' operation.
True
False
