WorksheetsComputer Programming Revision - Unit 1 to 4.3
Total questions: 20
Worksheet time: 11mins
All programming languages follow certain grammar while coding. What is this grammar called as?
information
command
instruction
syntax
Set of instructions constitute _____________
information
command
program
syntax
High level language is converted in to machine language using a translator. What type of translator is used in C & C++ ?
Interpreter
Compiler
Assembler
Decoder
Python uses _________ type of translator
Interpreter
Compiler
Assembler
Decoder
The type of translator that translates one line at a time is _______
Interpreter
Compiler
Decoder
Assembler
The binary codes are easily represented by mnemonic codes in __________ language
Low Level Machine
High Level
Assembly
C
_________ are the smallest unit of a program
Commands
Instructions
Tokens
Information
___________ keyword is used to prevent any changes in the variable.
static
const
fixed
constant
Programs written in few languages are executable on any machine. Such languages are called as ___________
Simple Language
High Level Language
Portable Language
Structured Language
\0 represents _________________
null character
Zero
void data type
Divide by Zero
Which of the following is an illegal variable name?
update_1
1_update
UPDATE
update
The default value of an automatic variable is ________
0
1
garbage value
0.5
Header files belong to which section of the C Program
Documentation Section
Link Section
Global Declaration Section
Definition Section
for c = 2, value of c after c <<= 1;
1
2
3
4
Which of the following is not an arithmetic operation?
a*=10
a!=b
a/=c
a+=10
The expression x = 4 + 2 % -8 evaluates to______
-6
6
4
0
What format specifier is used for signed int datatype?
%f
%ld
%d
%c
Escape sequences in c language are also called as ____________
Front slash characters
Backslash characters
Backspace Characters
Shift Characters
Which of the following is used for writing a decision making statement?
while
for
do while
if
What will be the output for the following program?
void main()
{
int i=65;
char j=’A’;
if(i==j)
printf(“NTTF”);
else
printf(“Bye”);
}
Bye
NTTF
Garbage Value
No Output
