WorksheetsC Viva
Total questions: 10
Worksheet time: 2mins
Which of the following is not a valid C variable name?
int number;
float rate;
int variable_count;
int $main;
How many keywords are there in C language?
32
33
64
18
What is an identifier in C language?
An identifier is a combination of alphanumeric characters used for conditional and control statements
An identifier is a combination of alphanumeric characters used for any variable, function, label name
Both A and B
None of the above
A C-style comment, simply surround the text with ___.
/* and */
// and //
//
/** and **/
Which are the fundamental data types in C?
char
int
float
All of these
For which type, the format specifier "%i" is used?
int
char
float
double
Which is the correct format specifier for double type value in C?
%d
%f
%lf
%LF
What is the correct syntax to declare a variable in C?
data_type variable_name;
data_type as variable_name;
variable_name data_type;
variable_name as data_type;
Which of the following is not an arithmetic expression?
x = 10
x /= 10
x %= 10
x != 10
What will be the output of the following C code?
#include <stdio.h>
int main()
{ int x = 20;
x %= 3;
printf("%d",x);
return 0; }
2
2.5
Error
Warning
