Together We Can Create Digital Systems That Provide Scale, Speed & Enable GrowthCohesive Digital Strategy · Secure IT Infrastructure · Secure Digital Foundation · New Digital EconomyTypes: Digital Business, Digital Operations, Digital Systems, Digital Technology<span>Digital Systems & TechDigital OperationsDigital Business<span>Latest Thinking</span></span>
Answer:
file_name = 'orders.txt'
file_obj = open( file_name, 'r' )
lines = file_obj.read()
print(lines.upper(), end = '')
Explanation:
- Define the name of the file
.
- Use the built-in open function to open the file in read mode
.
- Use the built-in read function to read the file and assign this to lines variable.
- Finally display the lines by converting them to capital alphabets by using the built-in upper() function.
Answer:
The correct answer to the following question will be "Local mapping".
Explanation:
- A data independence standard in global DBMSs where questions can be constructed without understanding the local formats. Knowledge of quotas of pieces and components is however important.
- With the transparency of local mapping, the user wants to determine both fragment location and name of data items, keeping in mind any replication that may occur.
- This is clearly a more complicated and time-consuming question for all the users to answer than the first. A program that only offers it the amount of transparency would be unlikely to be satisfactory to later part-users.
Therefore, "Local mapping" is the right answer.
Answer:
getline(cin, address);
Explanation:
Given
String object: address
Required
Statement that reads the entire line
The list of given options shows that the programming language is c++.
Analysing each option (a) to (e):
a. cin<<address;
The above instruction will read the string object until the first blank space.
Take for instance:
The user supplied "Lagos state" as input, only "Lagos" will be saved in address using this option.
b. cin address:
This is an incorrect syntax
c. getline(cin,address);
Using the same instance as (a) above, this reads the complete line and "Lagos state" will be saved in variable address
d. cin.get(address);
address is created as a string object and the above instruction will only work for character pointers (i.e. char*)
<em>From the above analysis, option (c) is correct.</em>