Grammar in Chomsky Normal Form
Let G be the grammar S -> ASB | e A -> aAS | a B -> SbS | A |bb "e" in first rule indicates Epsilon or empty string. Put G into Chomsky normal form.
Let G be the grammar S -> ASB | e A -> aAS | a B -> SbS | A |bb "e" in first rule indicates Epsilon or empty string. Put G into Chomsky normal form.
Given the declaration; int x; int *p; int *q; Mark the following statements that are invalid only. Then explain why it is invalid. p=q; Answer: *p=56; Answer: p=x; Answer: *p=*q; Answer: q = &x; Answer: *p = q; Answer:
Design and code an ANSI Standard C program which enhances the code at end of post to do the following: First using a for loop (with two iterations): a Ask for a Fahrenheit temperatures from the user . b Get a Fahrenheit temperatures from the user and to store it in an fArray. c Convert the temperatures to its Centigrade
Program Functions Design and code an ANSI Standard C program which enhances the code below only so as to make it a modular program. (each of the program four tasks of ask, get, alter and display are now separate functions). This will necessitate designing appropriate ask, get, alter and display functions. It will also nece
Explain modularization as used in computer programming. How do programmers use modules in computer programming to solve problems? Give an example of using modules to develop a program to track attendance in multiple classes at school. Looking for original information/thoughts, nothing copied directly from the internet can you h
Answer the following questions for each of the configuration in the table below. 1. How many subnets? 2. How many hosts per subnet? 3. What are the valid subnets? 4. What are the valid hosts per subnet? 5. What is the broadcast address for each subnet? IP ADDRESS SUBNET MASK
Compute the subnet mask, number of subnets and number of hosts in each subnet, in each of the given scenarios. Scenario 1: Required Number of Networks: 80 Minimum Number of Hosts: 3000 Network Address: 10.0.0.0 Scenario 2: Required Number of Networks: 20 Minimum Number of Hosts: 800 Network Address: 141.15.0
A palindrome consists of a word or deblanked, unpunctuated phrase that is spelled exactly the same when the letters are reversed. Write a recursive function that returns a value of 1 if its string argument is a palindrome. Notice that in palindromes such as level, deed, sees, and Madam I'm Adam(madamimadam), the first letter ma
Let arr be an array of 20 integers. Write a program that first fills the array with up to 20 input values and then finds and displays both the subscript of the largest item in arr and the value of the largest item.
I need this program to not accept a negative birth rate, negative death rate, or a population less than 2. Please see the attached file.
Write a C function named liquid() that is to accept an integer number and the addresses of the variables gallons, quarts, pints, and cups. The passed integer represents the total number of cups, and the function is to determine the number of gallons, quarts, pints, and cups in the passed value. Using the passed addresses, the fu
Write a C program to determine whether the year entered from the keyboard is a leap year. Display a message indicating whether the year is or is not a leap year. To calculate this problem, a year is a leap year if it is evenly divisible by 4 and not by 100, or if it is evenly divisible by 400. Check the remainder of the divi
Write C program to display in words what number is entered when a single digit is entered. Ask the user to enter a digit between 0 and 9. Have the program print out the digit in words, for example: Enter a digit between 0 and 9: 4 You entered the number four Assume that the user will enter only a single digit. The user
3 Miracle C Questions, see attached. 1. Between structured programming and OOP, which do you feel would require more preparation prior to coding? Justify your answer. 2. Can you have an array of arrays? If so, give a detailed example of when you would use one. 3. What are the purposes of the following three functions?
Can anyone help me explain the difference between a C and a SHELL programming language?
Some questions are attached, please give me detailed processes and explanations, thank you.
Write a C program that displays a title, "Currency Conversion," and then write the names of five currencies and their equivalents to the US dollar. The conversions are hard coded equations. Insert comments in the program to document the program internally. Attach a design flow chart (in MS Word, not Visio). Submit the source c
Hi, I need assistance in the following problem please. Derive test cases from the following informal specifications for a simple vending machine: Program CoinBox accepts quarters and distributes coffee. Users may: - insert a quarter - ask for a cup of coffee - ask for quarters to be returned Coffee costs 2 quarter
Please help with the following problem. This needs to be in "C" Write a function that shifts the stored value of five character variables in a circular fashion. Your function should work in the following way. Suspose that C1, C2, C3, C4, C5 are variables of type char, and suspose that the values of these variables are 'A'
Modify the attached program to not just say you won, lost, or tied but to say how, no matter if you win, lose, or tie. For example, You chose paper and I chose rock. You win. You chose rock and I chose paper. You lose. See the attached files.
****THIS NEEDS TO BE IN "C" NOT C++**** Consider the following code: int a=1,b=2,c=3: a+=b+=c+=7; What are values of a, b, and c? Write a test program in "C" to check it.
***This is in C*** Given abcdefghi as input char Ch='/'; while (Ch !='d') { putchar (Ch); Ch = getchar(); } What characters are outputed? abc, d, /abc, or /efghi Totally lost with this one (/efghi perhaps)
Can you please help me with the following study question? Thanks One of the functions in C program is special - this is the main() function. What is so special about it? What differs main() from any other function which may be present in your program? Should every function be executed when the program runs?
I have a study question that I need help with thanks. What are the available data types in the C language? Why do we have so many of them? Can you use just one data type in the whole program? If yes, what would be advantages and disadvantages of that?
Can you please help me answer the following study question? Thanks. How is the input and output processing structured in the C language? How can you display some combination of words and numbers on the computer's screen? How to get information from a keyboard to be used in your program? What are Output Format characters?
Write a software implementation of a simple three rotor Enigma Machine. Please refer to the following wikipedia entries for the Enigma Machine and the Enigma Rotor details. http://en.wikipedia.org/wiki/Enigma_machine http://en.wikipedia.org/wiki/Enigma_rotor_details For the current implementation, consider only the rotors
This is "C" programming. I think the answer is "e" but the text book I'm using seems to address everything but something that turns the light bulb on and says "Yes, you got it". Not sure where the "N" fits in without a valid statement after the int F (void). I'm probably trying to look too deep into the question. Given the
****This is "C" Programming**** I selected "b" but I've always seem to get lost doing Boolean. Assuming the following declarations: int A=1, B=2, C=3, D=4; What is the value of the following (Boolean) expression? C == D || B > A && C a. 0 b. 1 c. There is a syntax error in the expression. d. There is no
What are the major differences between C and C++ languages? What do you need to learn in a programming language, such as C, in order to use it effectively in problem solving?
NOTE: C coding is fine. Please explain the process. Senario: For many years, your Uncle Frank has been running a small landscaping business. Through these years, he acquired many steady clients and knew most of them on a first name basis. Once a month, after completing the work for that day, he would calculate (on the spot) h