Computer Knowledge

Programming Languages and Compilers

2,284 Questions

Programming languages and compilers involve the rules, syntax, and semantics used to write and execute software programs. Key areas include scripting languages, object oriented concepts, and parsing algorithms like top down parsers. Practice these computer science questions to build proficiency for technical and computer knowledge exams.

Object oriented languagesScripting languagesCompilers and parsersProgramming syntax

Programming Languages and Compilers Questions

Multiple choice technology programming languages
  1. The loop is skipped

  2. The loop is repeated for all the values of the field

  3. Infinite loop

  4. The loop is executed once.

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

In Model 204, when K is negative in 'FOR K VALUES OF FIELDNAME', the statement loops through ALL occurrences of the field, not just a limited number. This is a special case where a negative value acts as a flag to process the entire set. Option B correctly describes this behavior. Options A and D are incorrect because the loop is neither skipped nor executed just once. Option C is incorrect because the loop terminates after processing all values.

Multiple choice technology programming languages
  1. The FOR EACH RECORD IN ORDER BY statement retrieves and loops only on the first occurrence of a field in a record

  2. The FOR EACH RECORD IN ORDER BY statement loops only on the first occurrence of a field in a record

  3. The FOR EACH RECORD IN ORDER BY statement retrieves and loops on all the occurrence of a field in a record

  4. The FOR EACH RECORD IN ORDER BY statement retrieves and loops on only the last occurrence of a field in a record

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

The FOR EACH RECORD IN ORDER BY statement both retrieves and loops through only the FIRST occurrence of a field in each record, not all occurrences. This is important when you want to process unique records without duplicate field values. Option A correctly describes this behavior. Options B, C, and D are incorrect because the statement doesn't just loop without retrieval, doesn't process all occurrences, and isn't limited to the last occurrence.

Multiple choice technology programming languages
  1. The count obtained by the COUNT OCCURRENCES statement.

  2. The Count obtained from counting the number of 'IN' in your M204 Code.

  3. Counting of the M204 Database files used in the Code

  4. Count obtained by the Count Statement.

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

The COUNT IN clause refers specifically to the count value generated by the COUNT OCCURRENCES statement, not to counting 'IN' keywords or database files. This allows you to use the occurrence count in subsequent operations. Option A correctly identifies this relationship. Options B and D are incorrect because COUNT IN doesn't count keywords or use a generic Count statement. Option C is incorrect because it doesn't count database files.

Multiple choice technology programming languages
  1. FSBC

  2. TTBL

  3. GTBL

  4. STBL

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

In Model 204, TTBL (terminal table), GTBL (global table), and STBL (screen table) are valid user language working areas. FSBC is NOT a valid working area in the Model 204 system. Option A correctly identifies FSBC as invalid. Options B, C, and D are incorrect because they list valid working areas (TTBL, GTBL, STBL).

Multiple choice technology programming languages
  1. ADD statement

  2. CHANGE statement

  3. STORE RECORD statement

  4. All the Above

Reveal answer Fill a bubble to check yourself
D Correct answer
Explanation

The VALUE IN statement can be used with ADD, CHANGE, and STORE RECORD statements in Model 204, making it versatile for field manipulation. It allows you to reference specific values within these operations. Option D correctly states that VALUE IN works with all three statement types. Options A, B, and C are incorrect because VALUE IN isn't limited to just one of these statements - it works with all of them.

Multiple choice technology programming languages
  1. CHANGE FULLNAME TO NULL

  2. CHANGE FULLNAME TO ‘NULL’

  3. CHANGE FULLNAME TO 0

  4. DELETE FULLNAME

Reveal answer Fill a bubble to check yourself
D Correct answer
Explanation

The statement 'CHANGE FULLNAME TO' with no value specified is equivalent to 'DELETE FULLNAME' - it removes the field from the record. This is a shorthand way to delete a field without explicitly using the DELETE command. Option D correctly identifies this equivalence. Options A, B, and C are incorrect because they attempt to assign specific values (NULL as keyword, string, or number) when the actual operation is deletion.