1. A one-dimensional array that contains six (6) names of your classmates. Then, print the names using a foreach loop.
2. A two-dimensional array with two (2) rows and three (3) columns. Then, initialize the array with the first six (6) letters of the alphabet as its elements.
3. A string with any message. Then, determine if the message contains the string, "hello".
Suppose you’re developing an application which stores a user’s browser history. Explain which collection class will help to retrieve information of the last visited page?
Write a program using string function that will accept the course abbreviation as input value and it will display the corresponding college.
COURSE COLLEGE
BSBIO CAS
BSA CBS
BSBA
BSAT
BSENTREP
BSINFOTECH CCS
BSIS
BSCS
BSAR CEA
BSCE
BSECE
BSEE
BSIE
BSME
BSHRM CHM
BSTM
EOC CIT
BSIT
BEED COE
BSEED
BPE
BSSOC CSSP
BSSW
You are given N number of inputs.print the maximum of them each input
Task 1
Write a C++ function in which it reads namesfrom file “data.txt” into character array and remove
the repeating names. Write your updated names list in another file called “output.txt”
Example:
Data.txt
Hira
Ali
Ahmad
Imran
Ali
Warda
Annie
Ali
Kinza
Hira
Output.txt
Hira
Ali
Ahmad
Imran
Warda
Annie
Kinza
Task 1
Write a C++ function in which it reads namesfrom file “data.txt” into character array and remove
the repeating names. Write your updated names list in another file called “output.txt”
Example:
Data.txt
Hira
Ali
Ahmad
Imran
Ali
Warda
Annie
Ali
Kinza
Hira
Output.txt
Hira
Ali
Ahmad
Imran
Warda
Annie
Kinza
Write a C++ program that finds and reverse all the occurrences of a substring, pat, in a string,
text. Show the output on console. The data is read from a user provided input file named as
“input.txt”.
Example:
text: abcduyeruyabcdmneaabcabcd
pat: abcd
text: dcbauyeruydcbamneaabcdcba
Write a C++ program that finds and reverse all the occurrences of a substring, pat, in a string,
text. Show the output on console. The data is read from a user provided input file named as
“input.txt”.
Example:
text: abcduyeruyabcdmneaabcabcd
pat: abcd
text: dcbauyeruydcbamneaabcdcba
Declare variables text type of string and chr type of char.
Declare variables iOperand1 and iOperand2 type of int.