Question

In: Computer Science

5. The preprocessor translates an object program into a source program

5. The preprocessor translates an object program into a source program

Solutions

Expert Solution

Question:

5. The pre-processor translates an object program into a source program

Answer:

Pre-Processor is a Program that processes its Input Data to Produce output that is used as input to another program. Output manipulated by this is Pre-Processed from of the input data, This Pre-Processed Data is used by compiler programs further on.

Pre-Processor mainly used to perform these three tasks:

1. Removing Comments present in Source High Level Languages.

Comments present in High Level Language, Represented using below params:

(A) //

(B) /* Comment Here */

If any comments present in this above format.

All Comments will be removed from Code and the output code is passed on Compiler Program

2. File Inclusion:

Including all Library Header Files, which are present in pre-processor directives. Below is the Example for the same adding 'stdio.h' header file in High Level Language can be done using like #include "stdio.h"

3. Macro Expansion:

Macros are called as Small Functions, that can be used in different parts of High Level Language. Small Functions dont create a OverHead to any Program. These Macros can be used Recursively again and again. These small macro-functions are pre-processed as object-code. When these macros are used in source-code, object-code  is converted as source-code using Pre-Processor Program, So that Compiler Program can use this code.

YES - Pre-Processor translates an Object-Program into a Source Program.


Related Solutions

Write a program and test a program that translates the following Bubble Sort algorithm to a...
Write a program and test a program that translates the following Bubble Sort algorithm to a bubblesort function. The function's prototype is, void bubblesort(int a[], int size); Bubble Sort The inner loop moves the largest element in the unsorted part of the array to the last position of the unsorted part of the array; the outer loop moves the last position of the unsorted part of the array. The Bubble sort exchanges elements with adjacent elements as it moves the...
Write a program that translates a letter grade into a number grade. Letter grades are A,...
Write a program that translates a letter grade into a number grade. Letter grades are A, B, C, D, and F, possibly followed by + or -. Their numeric values are 4, 3, 2, 1 and 0. There is no F+ or F-. A “+” increases the numeric value by 0.3, a “–“ decreases it by 0.3. However, an A+ has value 4.0.4 pts Enter a Letter grade: B- The numeric value is 2.7 Your code with comments A screenshot...
In C++ Language English/Spanish Translation Program. Create a menu driven program that translates English to Spanish...
In C++ Language English/Spanish Translation Program. Create a menu driven program that translates English to Spanish and Spanish to English. Your translation program should use arrays for this program. You will need to populate the arrays with the contents of the English and Spanish data files provided. The two files are ordered such that each word in the one file corresponds to the respective translation in the other (i.e.: the first word in the ENG.txt file corresponds to the first...
Create a program that translates English into Pig Latin. The function will take the first letter...
Create a program that translates English into Pig Latin. The function will take the first letter of each word in the sentence only if it’s a not a vowel, and place it at the end of the word followed by “ay”. Your program must be case ​ins​ ensitive. You must write the functiontranslate() ​that takes in a single English word and ​returns​ its Pig Latin translation. Remembertranslatemusttake​onlyonewordasinput.​ ############################################################# # translate() takes a single english word translates it to #pig latin...
for eclipse java Overview Write a program that translates an English phrase into a Pig Latin...
for eclipse java Overview Write a program that translates an English phrase into a Pig Latin phrase. Input a phrase from the user and translate it to pig latin. You can assume the phrase will be on a single line. Use at least the REQUIRED METHODS listed below, with the exact same SPELLING for method names and parameters. Input Specification The input will be an English phrase, with NO terminal punctuation. Read the phrase as a SINGLE STRING using the...
Write a program that translates an English word into a Pig Latin word. Input ONE, and...
Write a program that translates an English word into a Pig Latin word. Input ONE, and ONLY one, word from the user, and then output its translation to Pig Latin. The rules for converting a word to Pig Latin follow. The general form for converting a word is to remove the first letter. Then append to the end of the word a hyphen, followed by the first letter that was removed, followed by "ay". For example, "robot" becomes "obot-ray" and...
The illumination of an object by a light source is directly proportional to the strength of...
The illumination of an object by a light source is directly proportional to the strength of the source and inversely proportional to the square of the distance from the source. If two light sources, one three times as strong as the other, are placed 11 ft apart, how far away from the stronger light source should an object be placed on the line between the two sources so as to receive the least illumination? (Round your answer to two decimal...
The illumination of an object by a light source is directly proportional to the strength of...
The illumination of an object by a light source is directly proportional to the strength of the source and inversely proportional to the square of the distance from the source. If two light sources, one four times as strong as the other, are placed 16 ft apart, how far away from the stronger light source should an object be placed on the line between the two sources so as to receive the least illumination? (Round your answer to two decimal...
How do I write a COBOL program that translates a word entered into pig Latin?
How do I write a COBOL program that translates a word entered into pig Latin?
whats the purpose of the following: source data structure source database object metadata an Oracle Database...
whats the purpose of the following: source data structure source database object metadata an Oracle Database Module SQL Server Database ODBC Model Warehouse Builder ODBC module for SQL Server
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT