Which of the following language is regular? I) {a¹b₁|i>=0} II) {a¹bi|0=1} IV) {a¹b³|i,J>1} ☐ || IV ☐ III וס
Q: 2. First Even Road (C PROGRAMMING) by CodeChum Admin I've been newly assigned as the city's road…
A: Logic:- read number of rows, columns iterate from i=0 to i<rows Iterate from j=0 to…
Q: 1. #include 2 3 int addNumbers (int a, int b) { 4 return a+b; 7 8 int main () 10 11 { 12 13 int x,у,…
A: From the given C code, we need to create the function prototype. In this case, the function…
Q: Q2 Combining languages Let L₁ = {ab, ba}, L2= {b, aa, abba}, L3= {x|x {a,b}* ^ |x| ≤ 3} = {A, a, b,…
A: We are given three languages and we are asked to evaluate (L1 *.L2) ∩ L3. First we will find out…
Q: in C++ make sure input for entering phone # is availible Given a long long integer representing a…
A: Start.Define a struct named StructuredPhoneNumber to represent phone numbers with area code, prefix,…
Q: 1. Why does little-endian vs. big-endian matter here in this code 2. Describe how pointer casting…
A: Answer: I have given answer in the brief explanation.
Q: C++ need help with part d to g only Assume the Product structure is declared as follows: struct…
A: Actually, given information Assume the Product structure is declared as follows: struct Product {…
Q: Write in C++ Sam is making a list of his favorite Pokemon. However, he changes his mind a lot. Help…
A: We need to write a C++ code for the given scenario.
Q: b) Describe a procedure visitors should follow to find a free parking space when the space they are…
A: I'm providing you the both B and c part of the above mentioned. I hope this will help you..
Q: Modify the DayOfYear class, to add a constructor that takes two parameters: a string object…
A: Algorithm:Define a class DayOfYear with a private mutable integer day representing the day of the…
Q: int func(int a, int b) { return (a<b)? a: b; } int main( ) { int x = 1, y = 3, z = 5; int w; w =…
A: Answer: 1
Q: What is a correct way to subtract 5 from fred's weight using the pointer variable 'ptr'?
A: Hi. Remember you have to use arrow(->) operator for pointers and dot operator(.) for normal…
Q: Discuss the difference between void pointer and null pointer with example
A: Step 1:- Void Pointer:- Void pointer is defined as a pointer variable that does not have any data…
Step by step
Solved in 1 steps
- Fractran interpreter def fractran(n, prog, giveup=1000): John Conway, who was quite a character among mathematicians, is best known for The Game of Life, not to be confused with the family board game sharing the same name. That achievement eclipsed basically all other wacky and original creations of Conway, so in the name of fairness, we ought to give his less appreciated creations an occasional turn in the flashing lights of the red carpet fame. This lab has you write an interpreter for the simple esoteric programming language called FRACTRAN, named as a pun of the word “fraction” and the FORTRAN programming language. (Things used to be all in uppercase back in when real scientists wore horn-rimmed glasses and their cars were equipped with tail fins, with occasional dollar signs interspersed as separators to keep the pampered prices of the military-industrial complex happy.) A program written in such mysterious and hard-to-decipher form consists of nothing but a list of positive…Question p .C language program Full explain this question and text typing work only We should answer our question within 2 hours takes more time then we will reduce Rating Dont ignore this line#include <cmath>#include <iostream>#include <string>#include <cctype>#include <algorithm>#include <iomanip> using namespace std;class A{public: int function() { return 0; }};class B : public A{ public: int x = 0; int function() { return 1 + x++; }}; int main(){ B b; cout << b.function() << b.function() << b.function() << b.function(); } The output of the given code is 4321. Explain why is it in descending, not ascending order(1234)
- Find errors / syntax error. Write line numberOcelot/PuTTY(C Language) Through this programming assignment, the students will learn to do the following: Learn to work with command line options and arguments Gain more experience with Makefiles Gain more experience with Unix Learn to use some of the available math funtions available with C Usage: mortgagepmt [-s] -r rate [-d downpayment] price In this assignment, you are asked to do a mortgage payment calculation. All information needed for this will be passed to the program on the command line. There will be no user input during the execution of the program. You will need a few pieces of information. The price of the home and the amount of the down payment. You will also need to know the interest rate and the term of the mortgage. To figure your mortgage payment, start by converting your annual interest rate to a monthly interest rate by dividing by 12. Next, add 1 to the monthly rate. Third, multiply the number of years in the term of the mortgage by 12 to calculate the number…Question 6 Arrays in c++ can contain different data types (a single array with different data types). O True O False
- #include <iostream>using namespace std; struct Person{ int weight ; int height;}; int main(){ Person fred; Person* ptr = &fred; fred.weight=190; fred.height=70; return 0;} What is a correct way to subtract 5 from fred's weight using the pointer variable 'ptr'?Huffman code // C program for Huffman Coding #include<stdio.h> #include<stdlib.h> #define MAX_TREE_HT 100 struct MinHeapNode { char data; unsigned freq; struct MinHeapNode *left, *right; }; struct MinHeap { unsigned size; unsigned capacity; struct MinHeapNode** array; }; struct MinHeapNode* newNode(char data, unsigned freq) { struct MinHeapNode* temp = (struct MinHeapNode*)malloc (sizeof(struct MinHeapNode)); temp->left = temp->right = NULL; temp->data = data; temp->freq = freq; return temp; } struct MinHeap* createMinHeap(unsigned capacity) { struct MinHeap* minHeap = (struct MinHeap*)malloc(sizeof(struct MinHeap)); minHeap->size = 0; minHeap->capacity = capacity; minHeap->array = (struct MinHeapNode**)malloc(minHeap-> capacity * sizeof(struct MinHeapNode*)); return minHeap; } void swapMinHeapNode(struct MinHeapNode** a, struct MinHeapNode** b) { struct MinHeapNode* t = *a; *a = *b;…Python LauguageThis assignment is not graded, I just need to understand how to do it. Please help, thank you! Language: C++ Given: Main.cpp #include #include "Shape.h" using namespace std; void main() { /////// Untouchable Block #1 ////////// Shape* shape; /////// End of Untouchable Block #1 ////////// /////// Untouchable Block #2 ////////// if (shape == nullptr) { cout << "What shape is this?! Good bye!"; return; } cout << "The perimeter of your " << shape->getShapeName() << ": " << shape->getPerimeter() << endl; cout << "The area of your " << shape->getShapeName() << ": " << shape->getArea() << endl; /////// End of Untouchable Block #2 //////////} Shape.cpp string Shape::getShapeName() { switch (mShapeType) { case ShapeType::CIRCLE: return "circle"; case ShapeType::SQUARE: return "square"; case ShapeType::RECTANGLE: return "rectangle"; case…SEE MORE QUESTIONS