Articles in definitions

1)
A. A series of computer instructions relating to each other is called computer program.
B. A series of computer instructions relating to each other is called a computer program.

2)
A. The computer instructions written in a programming language are called code.
B. The computer instructions written in a programming language are called the code.
C. The computer instructions written in a programming language are called a code.

I was told that for 1 B is correct and for 2 A is correct. So sometimes an article is required and sometimes not.

I would appreciate if anyone could point me to a rule or an explanation I can study so I can learn how to decide by myself which of sentences like these are correct:

The rectangles an Excel Worksheet consists of are called cells.
The rectangles an Excel Worksheet consists of are called its cells.

The three values representing colors are called color code.
The three values representing colors are called a color code.
The three values representing colors are called the color code.  

In coding = is called assignment operator.
In coding = is called an assignment operator.
In coding = is called the assignment operator. 

Converting code into machine language is called compilation. Converting code into machine language is called a compilation.

Joining character strings end-to-end is called concatenation.
Joining character strings end-to-end is called a concatenation. 

A combination of an operator with a series of integers and / or strings is called expression.
A combination of an operator with a series of integers and / or strings is called an expression. 

Thank you, Vidul


Solution 1:

You say : I was told that for 1 B is correct and for 2 A is correct. So sometimes an article is required and sometimes not.

You were having difficulty understanding why there was an article used in ...is called a computer programme, but not in ...is called code.

The answer is simply that "computer programme" is a countable noun, while "code", used in this sense, is a mass noun - and hence does not take an article.

In the same way one might say "I came downstairs this morning and found an upturned bucket and water all over the kitchen floor". The bucket is countable but water is not.

This will probably help you with the other examples you quote.