When you pass an array from main() to a function, the function has the ability to edit the values in the original array.
A. True
B. False
When a two-dimensional array is passed to a function, the parameter for the array must contain a constant or integer literal that represents the number of rows and columns.
A.True
B. False
To pass the starting memory address of an array to a function, you must precede the array name by the & symbol.
A. True
B. False
Which keyword or symbol is placed in a function prototype and definition to prevent the function from changing a passed array?
A. &
B. *
C. fixed
D. const
Observe the function prototype below:
void printSomething(int[]);
Based on the parameter, what is this function expecting?
A. A single element of an array
B. An array address ("pass by reference")
C. An entire array ("pass by value")
D. The size of an array
By using the same ___, you can build relationships between data stored in two or more "parallel" arrays.
A. data type
B. name
C. subscript
D. function
Look at the questions and choices on page 999 of your textbook.
Enter the UPPERCASE letter of your choice for each question when prompted below.
Enter your response for Question 1: [user types: a]
Enter your response for Question 2: [user types: D]
Enter your response for Question 3: [user types: B]
Enter your response for Question 4: [user types: b]
Enter your response for Question 5: [user types: A]
You answered 4 out of 5 questions correctly
This program will draw a playing field where the user decides the location of the Hero.
Enter the row # of the hero: [user types: 1]
Enter the column # of the hero: [user types: 3]
--H---------
-------------
-------------
-------------
-------------
1. Anagrams!
by CodeChum Admin
Two strings are called anagrams, if they contain the same characters, but the order of the characters may be different.
Given a string consisting of lowercase letters and question marks, s1, and another string consisting of lowercase letters, s2, determine whether these two strings could become anagrams by replacing each ? character in s1 with a letter.
Input
1. First string
Constraints
Contains only lowercase letters and/or question marks
2. Second string
Constraints
Contains only lowercase letters
Output
The first line will contain a message prompt to input the first string.
The second line will contain a message prompt to input the second string.
The last line contains the message "anagram" if the strings could become anagrams by replacing all the ? characters of s1 with letters and "false" otherwise.
Explain how overloading a unary operator is almost similar to overloading a binary operator with necessary examples and include main() function to demonstrate. Mention the differences between these two in terms of number of operands they deal with.