DB2 (pronounced "dibi dva" in Russian, tracing paper from English "dibi tu" is also common) is a family of software products in the field of information management from IBM. The most common references to DB2 are referring to the DB2 Universal Database (DB2 UDB) relational database management system, developed and manufactured by IBM.
Despite the goodwill for the Linux operating system, which is distributed under an open source license, IBM has no plans to open source its DB2 database yet. This was stated by the director of the IBM Linux Technology Center Jim Vasco at the annual Linux Foundation Collaboration Summit held in April 2011 in San Francisco. Within IBM, there is a constant struggle between representatives of different departments, Vasco explained. In some cases, the choice in favor of Linux or Windows means a decrease in revenue from software sales, but an increase in revenue from services, while in other cases it may be about revenue from the sale of hardware. We have to look for the optimal solution, he concluded. The move under Oracle's control of open source packages developed at Sun Microsystems has created problems for IBM, Vasco said. Oracle is trying to convince customers to trade IBM hardware for its own Exadata servers and Oracle Database. In 2011, Linux Foundation director Jim Zemlin expects the development of specialized high-performance systems like IBM Watson and off-the-shelf devices that require minimal configuration on Linux.
Implementation
Currently, in addition to the commercial products of the family, IBM also distributes a free distribution kit of DB2 Express-C for Linux (x86, x86-64, POWER), Windows (x86, x86-64), Solaris (x86-64), Mac OS X platforms (x86-64 beta). The free version has restrictions on the use of no more than one dual-core processor and 2 GB of RAM for the DBMS (the total number of processors and memory in the system can be any, but resources beyond the specified limits will not be used by the DBMS).
2017: Announcement of additions for control over data
Db2 on Cloud
The updated Db2 on Cloud is a fully managed service available on the IBM Cloud.
Among the characteristics of the technology:
- Dynamic scale ("slider") for setting performance parameters and memory size - with a click of the mouse, you can instantly change the scale, increasing or decreasing data processing performance and the required amount of RAM, in the same way you can increase the memory capacity of the information storage system;
- Web Console - Helps customers get up to speed with the service and accelerate their work with it.
Overall, Db2 on Cloud eliminates the time-consuming process of negotiating and purchasing additional computing resources and complements IBM Db2 Hosted, a version of the database hosted on the IBM Cloud.
Db2 on Cloud Benchmark
DB2 Analytics Accelerator
Versions
2017: JSON and HTAP
DB2 10 represents the first significant database upgrade in the last few years: the 10th version of the system for z / OS, however, was released in 2010, but this release is intended for Linux, Unix and Windows systems at the same time.
Both products contain new functionality. DB2 now supports the Resource Description Framework (RDF) format, and InfoSphere can interoperate with Apache Hadoop deployments. Other enhancements in DB2 include faster backup and I / O processes.
DB2 10 is also more flexible. In particular, DBMS administrators received tools for distributing data for storage across different types of media: for example, operational information can be located on faster solid-state drives, and less valuable data on cheaper and slower magnetic tape drives.
A new feature called time travel allows for more efficient management of time data and has been a huge hit with z / OS 10 users. With its help, a user or a program can study data in the context of their lifetime in the DBMS for specified periods. The use of such environments is relevant for analytics.
DB2 10 can be downloaded free of charge for use in an industrial environment on up to two processor cores and 2GB of memory. More functional versions start at $ 6,180, which includes the cost of annual maintenance. InfoSphere's cost is based on the number of processors or the amount of stored data, basic versions will cost about $ 40 thousand per TB.
IBM DB2 10.5 version
History
DB2 has a long history and is considered by some to be the first DBMS to use SQL.
From 1975 to 1982, a prototype DB2 was developed at IBM under the name System Relational, or System R. SQL was first implemented in IBM System R, but this system was of a research nature, and a commercial product, including SQL, was first released by Oracle in 1979 year.
DB2 got its name in 1982 with the first commercial release for VMs called SQL / DS, and then a release for MVS called DB2. For a long time, along with "DB2" was used the version "Database 2", which is also a trademark of IBM. Apparently, it meant that this is the second flagship DBMS IBM after the old hierarchical DBMS IMS.
The evolution of DB2 dates back to the early 1970s, when Dr. E.F. Codd at IBM developed the theory of relational databases and published a data manipulation model in June 1970. To implement this model, he developed a relational database language called Alpha. IBM chose to hand over further development to a group of programmers outside of Dr. Codd's control. Breaking some of the principles of the relational model, they implemented it as "Structured Query English", or SEQUEL for short. Since SEQUEL was already a registered trademark, the name was shortened to SQL - "Structured Query Language", and it remains so to this day.
Thus, historically, DB2 originated from the products DB2 for MVS (of which DB2 for z / OS is a descendant) and its sibling SQL / DS for VM (descendant of DB2 Server for VSE & VM). Later, another development team at IBM implemented the OS / 2 EE Database Manager server, which later evolved to DB2 v2 for OS / 2, AIX and then Windows, and then to DB2 UDB (its descendant is DB2 for Linux, UNIX and Windows). Another team integrated the DB2 architecture with the AS / 400 embedded database (descendant of DB2 for i). IBM is gradually moving towards integrating all of these branches.
Peculiarities
Distinctive features of DB2 include a dialect of the SQL language, which defines, with rare exceptions, a purely declarative meaning of language constructs, and a powerful multi-phase optimizer that builds an efficient query execution plan based on these declarative constructs. Unlike other dialects of SQL, in the SQL dialect of DB2, there are practically no prompts to the optimizer, the language of stored procedures is poorly developed (and for a long time was completely absent), and, thus, everything is aimed at maintaining a declarative style of writing queries. At the same time, the DB2 SQL language is computationally complete, that is, it can potentially define any computable correspondences between the source data and the result in a declarative form. This is achieved, among other things, through the use of table expressions, recursion and other advanced data manipulation mechanisms.
Due to IBM's priority in the development of relational theory and the firm's position in the computer industry, the DB2 SQL dialect has a significant impact on the ANSI / ISO SQL standards.
Stored procedures in DB2 are not very widely used, while traditionally used high-level programming languages (C, Java, PL / I, Cobol, etc.) to write stored procedures, this allows the programmer to easily design the same code, or as part of the application, or as a stored procedure, depending on whether it is more appropriate to run it on the client or on the server. DB2 also currently implements a procedural SQL extension for stored procedures in accordance with the ANSI SQL / PSM standard.
The DB2 optimizer makes extensive use of statistics on the distribution of data in tables (if collected by the database administrator), so the same SQL query can be translated into completely different execution plans depending on the statistical characteristics of the data it is processing.
Because DB2 has historically evolved from multi-user systems to mainframes, much of the DB2 architecture focuses on security and the role of the DB2 maintainer. In particular, unlike many other DBMSs, DB2 has separate roles for the DBMS administrator (responsible for configuring the DB2 software components and running them optimally on the computer system) and database administrator (responsible for managing data in a specific database).
The use of static SQL and the concept of packages, if necessary, in programs allows, unlike most other DBMSs, the implementation of such a security model, when the rights to perform certain operations can be issued to application programs in the absence of such rights from users working with these programs. In this case, this makes it possible to guarantee the inability of the user to work with the database bypassing the application program, if the user has only the rights to launch the program, but not to independently manipulate the data.
As part of the concept of increasing the level of integration of security in a computer system, DB2 does not have its own means of user authentication, integrating with the means of the operating system or specialized security servers. Within DB2, only authorization of users authenticated by the system is performed.
DB2 is the only general-purpose relational database management system that has hardware / software implementations (IBM i; IBM System z mainframe hardware also implements DB2 support).
Modern versions of DB2 provide extensive support for the use of XML data, including operations on individual elements in XML documents.
Send your good work in the knowledge base is simple. Use the form below
Students, graduate students, young scientists who use the knowledge base in their studies and work will be very grateful to you.
Posted on http://www.allbest.ru/
Minsk Institute of Management
Department of Automated Information Systems
General Engineering Practice Report
Dates of internship: from 19.11.2012 to 16.12.2012
Student group 111201-z
THEM. Vaitovich
Senior Leader
T.V. Rusak teacher,
Master of Engineering Science
Posted on Allbest.ru
Private educational institution
Minsk Institute of Management
Faculty: Engineering and Information
Department: Automated Information Systems
Specialty: 1-40 01 02 - Information systems and technologies (majors in)
Individual task for general engineering practice for student Hobotova Anastasia Mikhailovna, group №111201z
1. Topic of the abstract:
Database management system IBM DB2.
2. Individual task:
4. Schedule:
Name of educational (general engineering) practice events |
Dates of the |
||
Organizational meeting on IPR |
|||
Getting an individual assignment for practice |
11.09.12 - 24.09.12 |
||
Guided tours (exhibitions) |
19.11.12 - 24.11.12 |
||
Conducting seminars, meetings, conversations |
19.11.12 - 30.11.12 |
||
Preparation of an abstract |
01.12.12 - 09.12.12 |
||
Implementation of an individual assignment |
01.12.12 - 16.12.12 |
||
Practice report preparation |
17.12.12 - 11.03.13 |
||
Submission of a report on practice to the department |
|||
Practice Report Defense |
19.03.13 - 23.03.13 |
Head T.V. Hare
Introduction
1. Database management system
1.1 The concept of a DBMS
1.2 History of the creation of the DBMS
1.6 Large objects
1.8 Triggers
1.9 Relational expanders
1.11 Overview of IBM DB2 editions
2. Practical part
2.1 Statement of the problem
2.2 Algorithm for solving
2.3 Software implementation
2.4 Testing the program
Conclusion
Application
Introduction
The goal of general engineering practice is to consolidate and expand the knowledge acquired by the student during his studies, to acquire an idea of the future profession. The objectives of the practice are: - consolidation of the theoretical material presented in the lectures of the disciplines of the subject block;
Acquisition of computer skills, with Windows OS and a standard office suite;
Consolidation of the knowledge and skills obtained during the study of basic courses in computer science on the methods of using, developing and implementing classical algorithms in the studied programming languages;
Master the methods of professional search for information on the Internet;
Study the requirements for the design of reports, methods and application environments for the preparation of reports on the results of practice;
Working with office equipment.
The first section of the report examines the IBM DB2 database management system: the concept of a DBMS is described, the types and a brief description of the IBM DB2 DBMS are given.
In the second part of the report, an algorithm and a C program are developed to find the maximum element of array A in array B.
1. Database management system IBM DB2
1.1 The concept of a database management system
A database (DB) is a named collection of interrelated data that are under the control of a DBMS.
Database management system (DBMS) - a set of software and linguistic tools for general or special purposes, providing management of the creation and use of databases.
1.2 History of the creation of the DBMS
Vigorous activity on finding acceptable ways of socializing the continuously growing volume of information led to the creation in the early 60s of special software systems called "Database Management Systems" (DBMS).
The main feature of a DBMS is the presence of procedures for entering and storing not only the data itself, but also descriptions of their structure. The files, provided with a description of the data stored in them and under the control of the DBMS, began to be called databanks, and then "Databases" (DB).
When the production of computers of the ES EVM family began. The work was carried out in two directions. First of all, attempts were made to create their own original domestic DBMS. At the same time, analogs of some DBMS widespread abroad, capable of functioning on domestic hardware and software platforms, were developed in an accelerated mode. A similar approach was also used when creating a DBMS for hardware platforms, the serial production of which began in the country after the appearance of the ES computer platform - for SM computers, ASVT, IBM-compatible personal computers, etc.
1.3 History of the creation of the IBM DB2 DBMS
DB2 is a family of relational database management systems manufactured by IBM Corporation. It is one of the "mature" world DBMS, a constant leader in performance, in terms of technical implementation, scalability, etc.
DB2 has a long history. This is the first DBMS to use SQL. From 1975 to 1982, a prototype DB2 was developed at IBM called System Relational, or System R.
DB2 got its name in 1982 with the first commercial release for VMs called SQL / DS, and then a release for MVS called DB2.
The development of DB2 dates back to the early 1970s, when Dr. E.F. Codd, who worked for IBM, developed the theory of relational databases and published a data manipulation model in June 1970. To implement this model, he developed a relational database language called Alpha.
IBM DB2 is the world's most efficient and powerful database management system. Its main unique advantage is that any application written for DB2 will work with DB2 data servers running on any distributed platform supported by DB2 (Windows, HP-UX, Sun Solaris, Linux, Mac OS X, and AIX®).
DB2 comes in various editions and packages. All DB2 editions and packages are built from the same source code base; they differ only in functionality and licensing terms that target the capabilities, features, and benefits of DB2 to their respective market segments and price groups.
The range of tasks that can be solved using DB2 object extensions is significantly increased compared to the classic relational approach. By borrowing the elements most needed for modern applications from the object-oriented model, DB2 has retained all the advantages of a relational database management system. This makes it possible to use both relational and object-oriented approaches when building corporate information systems on its basis.
1.4 DB2 functionality
Functionality of DB2:
Multiplatform.
Advanced Copy Services (ACS). DB2 ACS allows you to use fast storage device copy technology to perform data copy work in backup and restore operations. The ability to copy data from a storage device dramatically speeds up backup and restore operations. Backing up using DB2 ACS is called snapshot backup.
Online table reorganization allows the user to reorganize a table without stopping full access to it.
High Availability Disaster Recovery (HADR) support. The DB2 HADR functionality provides high availability and failover support for DB2 databases.
Support for Materialized Query Tables, Query Parallelism, Multidimensional Clustering Tables (MDC).
Support for data compression when backing up.
SQL replication support.
Database Partitioning support. This functionality allows you to distribute a single database image across multiple physical servers.
DB2 Text Search. The DB2 Text Search feature allows you to search text columns in DB2 tables.
IBM Data Studio is a tooling platform that covers the entire application lifecycle (design, development, deployment, support and management) for all IBM relational databases, with the prospect of further expansion of support. This means that you have not only a portable SQL API, but also a set of tools that enable you to implement business logic throughout the enterprise.
1.5 User-defined data types
DB2 gives the user the ability to define new data types. The new data type must match one of the base types provided by the system, but their own semantics can be defined for them. At the same time, DB2 is able to manipulate such data in accordance with the logic defined for it. You can specify the set of operations that are valid for a data type by changing it from that of the underlying type.
DB2 has a strong typing mechanism. In this case, only those operations that are defined for itself, and not for the base class, are applicable to data of an undefined type. For a DBMS, this approach provides a powerful data integrity control mechanism.
So, you can define the type "zip code" as derived from an integer, but at the same time prohibit the operations of multiplication and division for data of this type, as meaningless, while for the base class, these operations are valid.
1.6 Large objects
DB2 / 2 and DB2 / 6000 provide the user with new data types such as binary large objects (BLOBS) and large text objects (CLOBS). BLOBS allows you to store data of any kind, up to two gigabytes in size. CLOBS have the same size limit, but are designed to store text as a sequence of single-byte or double-byte characters and can be associated with a specific code page. The presence of such data types makes it possible to embed relational tables with non-traditional data types, primarily multimedia. This ability is becoming increasingly important for modern applications, allowing you to store, for example, employee photos in the HR database, graphics, sound, video, large texts. The main focus is on achieving high performance and reliability, as well as removing restrictions on the use of large objects. For example, you can create a table with over ten fields containing 2GB objects.
The definition of new data types and functions provides great opportunities when working with large objects. This makes it possible to set the possibility of searching for a picture by its element, or the operation of comparing texts, etc.
1.7 User-defined functions
User-defined functions allow you to hide the internal view of the data from the application, providing some kind of data encapsulation. They also allow you to define new operations for both the underlying data and the user-defined types.
User-defined functions allow you to achieve code reuse by keeping operations common across different applications stored on the server rather than being included in each individual application. To implement these functions, programming languages are used, and to implement them in the DBMS, the CREATE FUNCTION statement introduced into the data definition language is used. In fact, this statement associates a user-defined function with a specific program that is executed when this function is called. Using UDFs instead of directly accessing the data can provide some kind of encapsulation of the data, which can be used to hide its internal structure from the user. In addition, DB2 supports the overloading mechanism for UDF names similar to that used in OODBs, but does not allow functions to be bound to specific data items, as methods and objects are bound in an object approach. The ability to work with both DB2 data and other data, such as files, e-mail, and others, provides additional flexibility to UDFs. There are two ways in which UDFs can interact with the DB2 server. The first is that the function has direct access to the database, which allows for maximum performance, but poses a potential threat to the server's health and data integrity. In the second variant, the function is executed as a separate process from the database server, which ensures data and DBMS protection, but reduces performance.
The user can choose the best approach for his task, depending on its specifics.
1.8 Triggers
Triggers define a set of operations that are performed when certain events occur in the database, such as when a table is updated.
Triggers can be used to execute functions that, in an object-oriented approach, are performed by methods (for example, checking the correctness of entered values), or by a constructor (assigning values when creating a new record).
The use of triggers allows you to make data "active", to model not only the structure and properties, but also the behavior of data objects stored in the database.
1.9 Relational expanders
The DB2 Relational Extenders are good examples of these new features. They provide extensive capabilities for working with non-traditional data by using the ability to define custom data types and functions. For storing multimedia data, and for maintaining the integrity of the links - triggers.
Currently, there are five relational extenders that allow you to work with images, complex text documents, video, audio, and even fingerprints.
1.10 Taking a Critical Review of the DB2 Database
Let's consider the pros and cons of a DBMS.
There is a nice free version;
The free version has no restrictions on the size of the database;
The free version does not have a limiter of requests, this allows you to simultaneously serve dozens of users;
Good free tech support;
Unlike PostgreSQL, it is possible to get paid support from the manufacturer, which allows it to be used in the Entrprise business sector;
With configurations, 1C-Enterprise in automatic locking mode works better than PostgreSQL (we are talking about parallelism, the area of locks is at the row level, not tables);
Good performance;
Fewer problems with non-unique indexes (in fact, to solve the problem, it is recommended to temporarily load the databases into DB2);
It handles situations like "there is not enough memory for the 1C server" better;
There is no limit to 256 tables, which expands the possibilities when working with RLS.
Few specialists and high cost of good specialists;
Low prevalence;
Unlike MS SQL Server, 1C releases "adapted" versions for new versions;
The size of the databases is larger than in other DBMS;
Requires "fine" tuning of the parameters of the DBMS, automatic tuning of the system is present, but incomplete;
Some messages by the platform may not be processed correctly, for a solution it is necessary to "lower the level" of error logging;
1C-MCC collects long-term requests, waiting on locks, but does not collect deadlocks.
1.11 Overview of IBM DB2 editions
Name of the edition |
Opportunities and Limitations |
|
IBM DB2 Express - C |
Basic free version of IBM DB2 DBMS. Technical support is not provided. Those. Limitations: Uses a maximum of 2 cores and 1 processor, 2 GB of RAM. There is no support for replication and clustering, there is no guarantee and the possibility of purchasing additional. software packages to expand the capabilities of the DBMS. Versions are released without service packs. Supported OS: Windows and Windows x64, Linux, Linux x86, Linux x64, Linux on Power, Solaris, Mac OS X. Supported OS: Windows, Linux (POWER and x86 servers), Mac OS X and Solaris x64. Recommended: for small healthcare facilities with limited financial resources and do not need technical support from IBM, number of users up to 50-70. |
|
IBM DB2 Express - C FTL (Fixed Term License) |
First commercial option. Completely similar to the previous product, but with a subscription to technical support for 12 months IBM 24x7 + support for replication + support for clusters of 2 servers + FixPack release and support for multiple versions. Those. Limitations: Uses a maximum of 2 cores and 1 processor, 2 GB of RAM. Supported OS: Windows, Linux (POWER and x86 servers), and Solaris x64. Recommended: for small and medium-sized hospitals with limited financial resources, but needing technical support from IBM, number of users up to 50-150. |
|
IBM DB2 Express Edition |
Initial release of IBM DB2 with 12 months technical support. Those. Limitations: up to 4 cores (Intel processors) and up to 4 GB of RAM. Can only be used on 2-processor 2-core servers (for Intel) or lower. Supported OS: Windows, Linux (POWER and x86 servers), AIX, Solaris (SPARC and x64), HP-UX (IA-64 only) Recommended: for small and medium-sized hospitals that need technical support from IBM users up to 70-200. |
|
IBM DB2 Workgroup Server Edition |
Server Edition Provides a DB2 data server that provides the same functionality as DB2 Express, but is designed for higher workload requirements that require more memory, processing power, higher availability out of the box, and a broader spectrum platform-specific deployment options. Those. Limitations: Various high-performance multiprocessor servers can be used (including Power, Itanium, Ultra SPARC, etc.), but up to 16GB of RAM for all processors. Supported OS: Windows, Linux (POWER, System z and x86 servers), AIX, Solaris (SPARC and x64), HP-UX (IA-64 only). Recommended: for medium and large healthcare facilities that require technical support from IBM with a number of users from 100. |
|
IBM DB2 Enterprise Server Edition |
For the largest institutions and most high-performance computing. Supported OS: Windows, Linux (POWER, System z, and System x), AIX, Solaris (SPARC and x64), and HP-UX servers (IA-64 starting with DB2 9.5 only). Recommended: for large healthcare facilities and a network of several healthcare facilities that require technical support from IBM with a number of users from 1000. |
1.12 Next-generation DB2 DBMS
IBM unveiled the next-generation DB2 9 database server, code-named Viper, which represents the most significant advancements in database technology in more than twenty years.
The release of DB2 9 marks the end of a five-year IBM project that has transformed traditional, static database technologies into an interactive, dynamic database server that provides customers with enhanced capabilities to manage all types of information such as documents, audio and video files, images, Web pages, and XML transactions with digital signatures.
The new IBM database server is the first in the industry to enable seamless, parallel movement of relational and XML data, regardless of format, platform or location.
More than 750 software developers from eight countries have contributed to the Viper Database Management System, which is designed and tuned with a focus on information management in SOA environments.
DB2 9 delivers three significant technological advances - patented pureXML technology, revolutionary Venom data compression technology, and advanced autonomous data management. This combination of industry-new functionality, coupled with security and disaster recovery enhancements, will accelerate requests for information and give customers unlimited access to information. In addition, the new version of DB2 provides access to information stored in conventional Oracle and MySQL databases, which vendors do not offer the same capability.
For the first time, IBM is releasing three editions of DB2 at once — for enterprise customers, for small and medium-sized businesses (DB2 Express), and for developers (DB2 Express-C).
"The DB2 Viper promises to change the competitive landscape for the database industry," said Ambuj Goyal, general manager, IBM Information Management. opportunities for our clients to expand their business by leveraging information on demand. "
Customers and partners who have pre-tested and evaluated DB2 9 have provided overwhelmingly positive feedback. Zurich Insurance, N.A., a leading commercial property accident insurance provider serving large corporations and small and medium-sized businesses, has decided to use DB2 9 to gain access to its new pureXML technology.
“The insurance industry is facing a growing need to store huge amounts of XML documentation.
PureXML technology provides an unprecedented level of flexibility in defining custom functions and performing external operations on XML data stored in legacy databases, ”said James Surber, Senior Database Administrator, Zurich Insurance N.A. "The ability to store different versions of the same XML documents with different structures in the same table will save us hours of manual unloading and reloading of the entire table when our XML structure changes."
2. Practical part
2.1 Statement of the problem
You are given two arrays: A, consisting of n elements, and B, consisting of m elements. Determine whether the largest element of array A is contained in array B.
2.2 Algorithm for solving
A diagram of the solution algorithm is shown in drawing 02.16.011.001
In block 1, the size of the matrices A and B is entered.
Blocks 2-11 are used to enter the matrix from the keyboard.
Blocks 12-23 are used to display the source arrays in matrix form.
Blocks 24-30 are used to find the maximum element of array A.
Blocks 31-37 are used to find the maximum element of array A in array B.
Blocks 38-40 are the final solution to the problem and show whether the maximum element of array A is in array B.
2.3 Software implementation
The listing of the program module for solving the problem in the C programming language is given in the appendix.
Initially, you need to declare all the variables:
int A, B, n, m, i, k, max, x;
where A and B are integer arrays consisting of 100 lines; n and m are variables that store the number of matrix rows; i and k are loop variables; max - an integer variable for storing the maximum element of array A; x is an integer variable for finding the maximum element of array A in array B.
scanf_s ("% d", & n);
scanf_s ("% d", & m);)
while (n> = 100, m> = 100);
The dimension is entered using the do… while loop, which allows you to check the correctness of the entered data. Because memory for an array is allocated statically, then the number of matrix rows should not exceed 100, which is specified when declaring arrays. In case of an erroneous input, the request for entering the array dimension will appear again.
Array elements are entered inside nested for loops: in the first loop, i changes - the line number from 0 to n-1, and in the second k - the line number from 0 to m-1. At execution of each iteration of the nested loops, a request is displayed for entering array elements and array elements are entered from the keyboard.
for (i = 0; i scanf_s ("% d", & A [i]);) for (k = 0; k printf ("Massiv A:"); for (i = 0; i printf ("% d", A [i]); printf ("Massiv B:"); for (k = 0; k printf ("% d", B [k]); Next, the variable max must be assigned an initial value equal to the zero element of the array, and going through the elements of the string of array A, we find the maximum element using the if statement. We assign the value max to the maximum element of the array A. The maximum element of array A is displayed on the screen.