NEW
Font size
WorksheetsC Programming Quiz 2
Total questions: 30
Worksheet time: 15mins
Who developed the C programming language?
James Gosling
Dennis Ritchie
Bjarne Stroustrup
Guido van Rossum
In which year was the C language developed?
1969
1972
1975
1980
Which company first developed the C language?
Microsoft
IBM
Bell Labs
Apple
C was developed as an improvement over which language?
Assembly
B
Java
COBOL
C is often referred to as a:
High-level language
Low-level language
Mid-level language
Scripting language
Which of the following is a primitive data type in C?
char
string
list
tuple
The `int` data type in C is used to store:
Floating-point numbers
Characters
Whole numbers
Strings
What is the size of the `float` data type in C?
1 byte
2 bytes
4 bytes
8 bytes
Which of the following data types can store a single character?
int
char
float
double
Which of the following is not a basic data type in C?
float
int
double
string
Which data type is used to store large floating-point numbers?
int
float
char
double
The `void` data type is used to:
Define a function with no return type
Store integer values
Return a character
Store floating-point numbers
Which modifier is used to change the size of data types like `int`?
large
long
float
void
In C, a variable is a:
Fixed value
Placeholder for storing values
Data type
Function
What symbol is used to declare a variable in C?
=
;
%
No special symbol
Which of the following is a valid variable name?
123variable
_myVar
int
float&
A variable that can store constant values throughout the program is declared using:
var
let
const
volatile
Which of the following variable names is invalid in C?
var_1
_variable
int
count1
Which of these data types can be used to declare a variable?
`float`, `char`
`loop`, `function`
`sum`, `product`
`digit`, `double`
Which of the following is the assignment operator in C?
==
=
:=
-->
The `&&` operator in C is used for:
Bitwise operations
Logical AND
Logical OR
Assignment
Which operator is used to add two values in C?
-
*
+
/
Which of the following is the modulus operator in C?
%
/
&
$
What does the `++` operator do to a variable?
Multiplies the value by 2
Divides the value by 2
Increases the value by 1
Decreases the value by 1
The `!=` operator is used to check if:
Two values are equal
Two values are not equal
A value is negative
A value is positive
Which operator is used to compare two values in C?
==
=
&
&&
Which operator is used to find the quotient in a division operation?
*
/
%
-
What is the result of the expression `5 % 2` in C?
2
0
1
5
What is the precedence of the `+` and `*` operators in C?
+ has higher precedence than *
* has higher precedence than +
Both have the same precedence
Precedence is undefined
Which of these is not a logical operator in C?
&&
||
!
%
