WorksheetsLevel 3 50 MCQs
Total questions: 50
Worksheet time: 25mins
Which symbol is used to end a statement in C?
:
;
.
,
Which function is used to display output in C?
input()
print()
printf()
display()
Which header file is required for printf()?
stdlib.h
conio.h
stdio.h
math.h
Which keyword is used to declare a variable?
var
let
int
declare
What is the correct extension of a C program file?
.cp
.cpp
.c
.txt
Which data type is used to store decimal values?
int
char
float
void
Which operator is used for addition?
*
+
-
/
Which keyword is used to start a program execution?
start()
main()
begin()
run()
Which symbol is used for single-line comments?
/* */
#
//
**
Which symbol is used for multi-line comments?
//
/* */
##
%%
Which data type stores a single character?
int
float
char
double
Which operator is used to get remainder?
/
%
*
+
Which keyword is used to take input from the user?
get()
read()
scanf()
input()
Which format specifier is used for integer?
%f
%d
%c
%s
Which format specifier is used for float?
%d
%c
%f
%s
Which loop executes at least once?
for
while
do-while
if
Which keyword is used for decision making?
loop
switch
if
both b and c
Which operator is used for assignment?
==
=
>=
!=
Which operator checks equality?
=
==
!=
Which keyword is used to define a function?
function
define
void
fun
Which data type does not return any value?
int
char
void
float
Which operator has highest priority?
+
*
=
&&
Which symbol is used for address of a variable?
*
#
&
%
Which symbol is used for pointer declaration?
&
*
->
%
Which function reads a character?
getchar()
gets()
scanf()
read()
Which function prints a character?
putc()
puts()
printf()
printc()
Which statement is used for multiple choices?
if
if-else
switch
for
Which symbol ends a string?
\n
\0
\t
\s
Which data type is used for true/false?
bool
int
char
float
Which operator is used for logical NOT?
!
~
^
#
Which loop condition is checked at the end?
for
while
do-while
if
Which keyword is used to include header files?
import
include
#include
using
Which escape character is used for new line?
\t
\b
\n
\a
Which language is C?
Object-oriented
Scripting
Procedural
Markup
Define structure in c?
group of items with different data types.
group of items with similar data types.
both a and b
none of these
Default sorting order?
Ascending order
descending order
both a or b
none of these
What is the correct way to declare a constant in C?
int const x = 10;
both a and c
constant int x = 10;
const int x = 10;
Which function is used to allocate memory dynamically?
realloc()
all of the above
calloc()
malloc()
Which operator is used to compare two values?
=
both a and c
==
!=
What is the correct way to declare a constant in C?
const int x;
int const x;
both a and b
constant int x;
Which operator is used to compare two values?
!=
===
==
=
What is the purpose of the 'return' statement in a function?
To exit the function
To return a value to the caller
Both a and b
To declare a variable
what will be the result
printf( "%d", printf("Hello, Bro!!"));
error
Hello, Bro!!
Hello, Bro!!Hello, Bro!!
Hello, Bro!!13
What is the purpose of the 'sizeof' operator?
To compare two values
To declare a variable
To allocate memory
To get the size of a variable
which reduce if else statement in c?
? :
else if
==
if
Which function is used to free dynamically allocated memory?
dispose()
dealloc()
delete()
free()
Which keyword is used to declare a variable as constant?
final
const
immutable
static
pick assignment operator.
&&
=
==
||
Which operator is used to perform subtraction?
*
+
/
-
Which operator is used to increment a variable by one?
++
+=
+1
--
