Practice character Quizzes
Explore character in depth with quizzes covering fundamentals to advanced concepts. DevBrainiac's structured quiz format helps you understand theory, apply logic and master problem-solving techniques. With continuous practice, you can track progress, fix mistakes and build strong command of character.
Explore All character Quizzes
Learn character step by step with interactive quizzes designed for beginners and learners revising key concepts. Build a strong foundation with clear, structured practice in character.
Question 1
What is a character in programming?
1
A single letter, digit or symbol represented in a programming language
2
A type of variable that stores numeric values
3
A function that manipulates text
4
A method to format strings
Question 2
In C and Java, how are character literals represented?
1
Enclosed in curly braces (e.g. {A})
2
Enclosed in single quotes (e.g. 'A')
3
Enclosed in double quotes (e.g. "A")
4
No special representation is required
Question 3
What is the ASCII value of the character 'A'?
1
64
2
97
3
65
4
32
Question 4
Which of the following statements about Unicode is true?
1
Unicode can represent characters from all languages
2
Unicode only supports English characters
3
ASCII is more comprehensive than Unicode
4
Unicode is limited to 8 bits
Question 5
What is the Unicode representation of the character 'A'?
1
\u0042
2
\u0043
3
\u0040
4
\u0041
Question 6
Which encoding format supports emoji characters?
1
ASCII
2
EBCDIC
3
ANSI
4
UTF-8
Question 7
What will be the output of the following C++ code?
#include <iostream>
#include <string>
#include <cstring>
using namespace std;
int main(int argc, char const *argv[])
{
const char *a = "Hello\0World";
cout<<a;
return 0;
}1
Hello World
2
Error
3
World
4
Hello
Question 8
What is the minimum value that can be stored in a char variable in Java?
1
-128
2
-32768
3
0
4
'a'
Question 9
What is the default value of a boolean array element in Java if it's not explicitly initialized?
1
true
2
false
3
0
4
null
Question 10
Which of the following is not a valid way to declare a char variable in Java?
1
char x = 'M'
2
char w = 0x0041
3
char x = 'a'
4
char x = 64
Question 11
Which data type is used to store a single character in Java?
1
char
2
character
3
String
4
Character
Question 12
In Python, which function is used to get the ASCII value of a character?
1
ord()
2
chr()
3
ascii()
4
asc()
Question 13
What will be the output of the following Python code?
print(chr(66))
1
b
2
66
3
A
4
B
Question 14
In Java, what is the default value of a char variable?
1
'\u0000'
2
0
3
' '
4
null
Question 15
What will be the output of the following Python code?
print(ord('z') - ord('a'))1
24
2
-25
3
26
4
25
Question 16
In JavaScript, which method is used to get the Unicode of a character?
1
codeAt()
2
getCode()
3
charCodeAt()
4
asciiCodeAt()
Question 17
In Python, which function converts an integer ASCII value to its corresponding character?
1
chr()
2
ord()
3
asc()
4
convert()
Question 18
What is the value of '1' + 1 in JavaScript?
1
TypeError
2
11
3
NaN
4
2
Question 19
What will be the output of 'A' + 1 in Python?
1
TypeError
2
A1
3
66
4
B
Question 20
In C++, which of the following correctly initializes a char array?
1
char arr[5] = "Hello";
2
char arr[] = "Hello";
3
char arr[] = {'H', 'e', 'l', 'l', 'o'};
4
Both 2 and 3
Question 21
What is the output of the following Java program?
System.out.println('A' + 1);1
Compilation Error
2
B
3
A1
4
66
