WorksheetsBASIC C PROGRAMMING
Total questions: 15
Worksheet time: 8mins
Which of the following is not a valid C variable name?
int number;
float rate;
int variable_count;
int $main;
All keywords in C are in ____________
LowerCase letters
UpperCase letters
CamelCase letters
None of the mentioned
Which of the following is true for variable names in C?
They can contain alphanumeric characters as well as special characters
It is not an error to declare a variable to be one of the keywords(like goto, static)
Variable names cannot start with a digit
Variable can be of any length
Which of the following is not a logical operator?
&&
!
||
|
How many keywords are there in C language?
30
31
32
33
6. Which of the following cannot be a variable name in C?
volatile
true
friend
export
Which keyword is used to prevent any changes in the variable within a C program?
immutable
mutable
const
volatile
What is the result of logical or relational expression in C?
True or False
0 or 1
0 if an expression is false and any positive number if an expression is true
None of the mentioned
What is #include <stdio.h>?
Preprocessor directive
Inclusion directive
File inclusion directive
None of the mentioned
Which of the following are C preprocessors?
#ifdef
#define
#endif
all of the mentioned
The C-preprocessors are specified with _________ symbol.
#
&
%
*
scanf() is a predefined function in______header file.
stdlib. h
ctype. h
stdio. h
stdarg. h
What will be the output of the following C code?
Compile time error
Hello World! 34
Hello World! 1000
Hello World! followed by a junk value
Which is valid C expression?
int my_num = 100,000;
int my_num = 100000;
int my num = 1000;
int $my_num = 10000;
What will be the final value of x in the following C code?
3.75
Depends on compiler
24
3
