More Classes
5th Class
6th Class
7th Class
8th Class
9th Class
10th Class
11th Class
12th Class
NAT I
NAT II
CSS
IQ
General Knowledge
MDCAT
ECAT
GAT General
GAT Subject
Other Links
Go to Home
Online Tests
Computer Science 10th Class English Medium Chapter 2 Online Test MCQs With Answers
Question # 1
Which is a built-in function in C language that takes input from user into the variables ?
Choose an answer
printf()
scanf()
input
print
Previous
Skip
Next
Question # 2
Which operators are used to perform arithmetic operations on data ?
Choose an answer
assignmentoperator
arithmeticoperator
logicaloperator
relational operators
Previous
Skip
Next
Question # 3
printf is to used print _________ type of data:
Choose an answer
int
float
char
all of them
Previous
Skip
Next
Question # 4
In C language _______ is used as statement terminator:
Choose an answer
;
:
,
"
Previous
Skip
Next
Question # 5
In escape sequence first character is always __________ and the second character varies according to the functionality that we want to achieve:
Choose an answer
back slash (\)
/
?
:
Previous
Skip
Next
Question # 6
Which format specifier is used for integer data type ?
Choose an answer
%d
%i
both a and b
none of these
Previous
Skip
Next
Question # 7
Which of the following are logical operators ?
Choose an answer
AND
OR
NOT
all of these
Previous
Skip
Next
Question # 8
Escape sequences are used in printf function inside the:
Choose an answer
"and"
'and'
:and:
,and;
Previous
Skip
Next
Question # 9
Which operator performs division of left operand by the right operand and returns the remainder value after division ?
Choose an answer
+
%
*
.
Previous
Skip
Next
Question # 10
Which operator is used to divide the value on left side by the value on right side ?
Choose an answer
\
/
+
-
Previous
Skip
Next
Question # 11
Which operator assigns the result of expression on right side to the variable on left side ?
Choose an answer
==
=
*
( )
Previous
Skip
Next
Question # 12
Which operator makes it true, if it is false and false if it true ?
Choose an answer
Previous
Skip
Next
Question # 13
Let the following part of code, what will be the value of variable an after execution:
int a = 4;
float b= 2.2;
a = a * b;
Choose an answer
8.8
8
8.2
8.0
Previous
Skip
Next
Question # 14
Which of the following is escape sequence ?
Choose an answer
\n
\t
\a
all of these
Previous
Skip
Next
Question # 15
Which of the following is a type of operator ?
Choose an answer
assignment operator
arithmeticoperators
logicaloperators
all of these
Previous
Skip
Next
Question # 16
Which symbol is used to represent the OR operator ?
Choose an answer
Previous
Skip
Next
Question # 17
Which of the following is a valid line of code ?
Choose an answer
int = 20;
grade = 'A';
line = this is a line,
none of these
Previous
Skip
Next
Back