Question

In: Computer Science

4. Create an array with the values “Andrew,” “Andy,” and “Kaufman” (without the quotes). Write a...

4. Create an array with the values “Andrew,” “Andy,” and “Kaufman” (without the quotes). Write a program that prints Andrew “Andy” Kaufman in perl.

Solutions

Expert Solution

Code:

@names=("Andrew","Andy","Kaufman");
print "$names[0] \"$names[1]\" $names[2]";

Screenshots:

Here to print double quotes we need to use \ which is an escape character.


Related Solutions

Please write your opinion in 350 words as to why if Andrew (Andy) Fastow did not...
Please write your opinion in 350 words as to why if Andrew (Andy) Fastow did not violate Generally Accepted Accounting Principles he was sent to jail. Do you think the conviction was fair?
Write a program in c++ that reads x[4]. Then create the array y[6||6], such that the...
Write a program in c++ that reads x[4]. Then create the array y[6||6], such that the first quarter of y consists of the value of the first element of x. The second quarter of y consists of the value of the second element of x. The third quarter of y consists of the value of the third element of x. The fourth quarter of y consists of the value of the fourth element of x?
In C create an array of 4 integers. Assign a pointer to the array. Use the...
In C create an array of 4 integers. Assign a pointer to the array. Use the pointer to find the average value of the elements in the array and display the results on the screen.
Programming in C++ Write a program that prints the values in an array and the addresses...
Programming in C++ Write a program that prints the values in an array and the addresses of the array’s elements using four different techniques, as follows: Array index notation using array name Pointer/offset notation using array name Array index notation using a pointer Pointer/offset notation using a pointer Learning Objectives In this assignment, you will: Use functions with array and pointer arguments Use indexing and offset notations to access arrays Requirements Your code must use these eight functions, using these...
Write a program that uses an array of doubles initialized to whatever values you wish. Write...
Write a program that uses an array of doubles initialized to whatever values you wish. Write methods to calculate and return the minimum and a method to calculate and return the maximum value in the array. You must write YOUR ORIGINAL methods for minimum and maximum. You MAY NOT use Math class methods or other library methods. Write an additional method that accepts the array as a parameter and then creates and returns a new array with all the same...
1) Define and create an array of integers with the values 5, 7, 8, 9 10,...
1) Define and create an array of integers with the values 5, 7, 8, 9 10, 12 using an initializer list. Print the array. 5. 2) Given the Array below, replace the element at position 3 with the value, 99, using an assignment statement. int [] list = {88, 0, 11, 22, 55, 77}; What is the value of list.length?
Write a recursive method to determine if a String is a palindrome. Create a String array...
Write a recursive method to determine if a String is a palindrome. Create a String array with several test cases and test your method. Write a recursive method to determine if a String is a palindrome. Create a String array with several test cases and test your method. In Java
Write a Java program to create an array of a specific size (which is an input...
Write a Java program to create an array of a specific size (which is an input from the user) and fill it with random numbers between 1 and 100. Then sort the array and count how many of these numbers are originally at sorted position. Display that original array, the sorted array, and the count (number of elements originally at sorted position).
Directions: Write a C++ program that will create an array of four integers. It will allow...
Directions: Write a C++ program that will create an array of four integers. It will allow the user to enter in four valid scores and store them in the array. ( valid range is 0 - 100) It will compute the letter grade based upon the four scores, namely, A = 90 - 100, B= 80- 89, C = 70-79, D = 60-69, otherwise F. It will display the scores and letter grade to the screen. NOTE: No menu is...
Write, specify and prove the function copy that copies a range of values into another array,...
Write, specify and prove the function copy that copies a range of values into another array, starting from the first cell of the array. First consider (and specify) that the two ranges are entirely separated. Note: Prototype is as below. void copy(int const* src, int* dst, size_t len){ }
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT