Wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Computer Programming Revision - Unit 1 to 4.3

Total questions: 20

Worksheet time: 11mins

Name
Class
Date
1.

All programming languages follow certain grammar while coding. What is this grammar called as?

a)

information

b)

command

c)

instruction

d)

syntax

2.

Set of instructions constitute _____________

a)

information

b)

command

c)

program

d)

syntax

3.

High level language is converted in to machine language using a translator. What type of translator is used in C & C++ ?

a)

Interpreter

b)

Compiler

c)

Assembler

d)

Decoder

4.

Python uses _________ type of translator

a)

Interpreter

b)

Compiler

c)

Assembler

d)

Decoder

5.

The type of translator that translates one line at a time is _______

a)

Interpreter

b)

Compiler

c)

Decoder

d)

Assembler

6.

The binary codes are easily represented by mnemonic codes in __________ language

a)

Low Level Machine

b)

High Level

c)

Assembly

d)

C

7.

_________ are the smallest unit of a program

a)

Commands

b)

Instructions

c)

Tokens

d)

Information

8.

___________ keyword is used to prevent any changes in the variable.

a)

static

b)

const

c)

fixed

d)

constant

9.

Programs written in few languages are executable on any machine. Such languages are called as ___________

a)

Simple Language

b)

High Level Language

c)

Portable Language

d)

Structured Language

10.

\0 represents _________________

a)

null character

b)

Zero

c)

void data type

d)

Divide by Zero

11.

Which of the following is an illegal variable name?

a)

update_1

b)

1_update

c)

UPDATE

d)

update

12.

The default value of an automatic variable is ________

a)

0

b)

1

c)

garbage value

d)

0.5

13.

Header files belong to which section of the C Program

a)

Documentation Section

b)

Link Section

c)

Global Declaration Section

d)

Definition Section

14.

for c = 2, value of c after c <<= 1;

a)

1

b)

2

c)

3

d)

4

15.

Which of the following is not an arithmetic operation?

a)

a*=10

b)

a!=b

c)

a/=c

d)

a+=10

16.

The expression x = 4 + 2 % -8 evaluates to______

a)

-6

b)

6

c)

4

d)

0

17.

What format specifier is used for signed int datatype?

a)

%f

b)

%ld

c)

%d

d)

%c

18.

Escape sequences in c language are also called as ____________

a)

Front slash characters

b)

Backslash characters

c)

Backspace Characters

d)

Shift Characters

19.

Which of the following is used for writing a decision making statement?

a)

while

b)

for

c)

do while

d)

if

20.

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”);

}

a)

Bye

b)

NTTF

c)

Garbage Value

d)

No Output