What is printed from fun ('G') as coded below? void fun (char c) { if (c < 'A' || c> 'Z') { return; } cout << c << ""; fun (c + 1);
Q: This expands the previous work to enable handling multiple employees. You will do this by…
A: #include <stdio.h> #include <stdlib.h> struct employees { char name[20]; int ssn[9]; int…
Q: #include #include using namespace std; //hasHelpOption() definition int hasHelpOption(int argc,…
A: Your program gives the following warning on compilation: It is because the compiler can not tell…
Q: * Function: str_trim Description: effectively removes all leading and trailing whitespace from the…
A: Trim function in C
Q: QUESTION 23 Given int *ptr, x[6]={11, 238, 4, -70, 9, -53); What the following statement does?…
A: The given code: *(x+3)=12
Q: 1) Define a global variable Emps that is an array of pointers to employee structs. 2) Change your…
A: The solution to the given problem is below. ***According to Bartleby policy we are allowed to…
Q: remove_substring_from_string(s, substr): This function takes two strings s and substr as input. It…
A: PROGRAM CODE: # start definition of function to remove substringdef remove_substring_from_string(s,…
Q: Write the_code for the function printRoster, it should print out the contacts in a format similar to…
A: 1. Run loop for each pair in roster i. print the key and end line. ii. run loop for…
Q: Variable names in C, generically called identifiers, use the underscore character to mash together…
A: More sense naming convention: When compare to camel case, the snake case makes more sense to the…
Q: Write a function called deleteRepeats that has a partially filled array of characters as a formal…
A: To delete repeated characters from a character array.
Q: #include #include using namespace std; int index1(char *T,char *P) { int t=0,p=0,i,j,r;…
A: To remove function, use all statements outside the function and remove the function header. instead…
Q: Please Help C++ Write a function that returns an integer and accepts a pointer to a C-string as an…
A: Here is the c++ code: See below step for code.
Q: Explain the problem with the following code: int a[] = {1, 2, 3, 4, 5}; a[5] = 10; cout << a[5] <<…
A: I have given an answer in step 2.
Q: Program Specifications Write a function called rCopy that copies the entire contents of one file to…
A: I have designed and developed the program for the given question Assuming that it is to be written…
Q: Complete the C++ function given below: bool check_anagram(string s1, string s2){ //returns true if…
A: Please find the answer below :
Q: A CNC router has a tool which can be moved along three axes to carve shapes out of metal or wood…
A: Required C++ is mentioned below with output:
Q: This is the C code I have so far #include <stdio.h> #include <stdlib.h> struct…
A: As per our guidelines, we are supposed to answer only 1st three parts. Kindly repost the remaining…
Q: Please read all parts and answer in C++. Do not provide an answer that was already used by other…
A: The C++ code is given below with code and output screenshots if/else or switch statement is not…
Q: /*Line 1:*/ doublevalues[6] = {10, 20, 30, 40, 50, 60}; /*Line 2:*/ double* yalptr= values; /*Line…
A: NOTE: - There is error on line 1 the way of declaring and initializing an array is wrong.…
Q: In c++, Write a function that returns the greatest common divisor of 2 integers.
A: Let's see the algorithms first. Declare and initialize the two variables as integer type. Declare…
Q: n c++ i have this struct struct Student { string firstName, lastName; int pointTotal;…
A: The question is to write C++ code in respect to the given condition.
Q: Complete function RollSpecific Number() that has three parameters: a GVDie struct object, an integer…
A: The answer is given in the below step
Step by step
Solved in 3 steps with 1 images
- This 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…#include <bits/stdc++.h> using namespace std; struct Employee { string firstName; string lastName; int numOfHours; float hourlyRate; char major[2]; float amount; Employee* next; }; void printRecord(Employee* e) { cout << left << setw(10) << e->lastName << setw(10) << e->firstName << setw(12) << e->numOfHours << setw(12) << e->hourlyRate << setw(10) << e->amount << setw(9) << e->major[0]<< setw(7) << e->major[1]<<endl; } void appendNode(Employee*& head, Employee* newNode) { if (head == nullptr) { head = newNode; } else { Employee* current = head; while (current->next != nullptr) { current = current->next; } current->next = newNode; } } void displayLinkedList(Employee* head) { Employee* current = head; if(current!=nullptr){ cout…#include <bits/stdc++.h> using namespace std; struct Employee { string firstName; string lastName; int numOfHours; float hourlyRate; char major[2]; float amount; Employee* next; }; void printRecord(Employee* e) { cout << left << setw(10) << e->lastName << setw(10) << e->firstName << setw(12) << e->numOfHours << setw(12) << e->hourlyRate << setw(10) << e->amount << setw(9) << e->major[0]<< setw(7) << e->major[1]<<endl; } void appendNode(Employee*& head, Employee* newNode) { if (head == nullptr) { head = newNode; } else { Employee* current = head; while (current->next != nullptr) { current = current->next; } current->next = newNode; } } void displayLinkedList(Employee* head) { Employee* current = head; if(current!=nullptr){ cout…
- #include<bits/stdc++.h>using namespace std;bool isPalindrome(string &s){ int start=0; int end=s.length()-1; while(start<=end) { if(s[start]!=s[end]) { return false; } start++; end--; } return true;}int main(){ string s; cout<<"ENTER STRING:"; getline(cin,s); int n=s.length(); bool flag=true; for(int i=1;i<n;i++) { string lowerHalf=s.substr(0,i); string upperHalf=s.substr(i,n-i); if(isPalindrome(lowerHalf) && isPalindrome(upperHalf)) { flag=false; cout<<"String A is:"<<lowerHalf<<"\n"; cout<<"String B is:"<<upperHalf<<"\n"; break; } } if(flag) { cout<<"NO\n"; } return 0;} change to stdio.h string.hIn C++Find the output = for( int a = 5; a >0; a -- ) { cout << "value of a =" << a << endl; } *This assignment will give you practice on basic C programming. You will implement a few Cprograms