This document discusses arrays and pointers in C++. It begins by explaining that arrays allow storing multiple values of the same type, and that arrays have a fixed size and type after declaration. It then covers how to declare, initialize, access elements of, and iterate through arrays using indexes and loops. Multidimensional arrays are also explained, including how they can be thought of as tables with rows and columns. The document concludes by introducing pointers as variables that store the memory addresses of other variables.
The document provides information about arrays and pointers in C++. It discusses how to declare, initialize, access elements of arrays including multi-dimensional arrays. It also covers pointers, how they store memory addresses rather than values, and how to declare and assign addresses to pointers. Key topics include declaring arrays with syntax like dataType arrayName[size]; initializing arrays; accessing elements using indices; multi-dimensional arrays of different sizes; declaring pointers with syntax like int* pointer; and assigning addresses to pointers using &operator.
In this chapter we will learn about arrays as a way to work with sequences of elements of the same type. We will explain what arrays are, how we declare, create, instantiate and use them. We will examine one-dimensional and multidimensional arrays. We will learn different ways to iterate through the array, read from the standard input and write to the standard output. We will give many example exercises, which can be solved using arrays and we will show how useful they really are.
The document contains lecture notes on one-dimensional and two-dimensional arrays in C programming. It discusses the syntax, declaration, initialization, and accessing of array elements. Examples are provided to demonstrate reading input from users, traversing arrays using for loops, and performing operations like addition and multiplication on two-dimensional arrays. Class exercises described include programs to read and display arrays, find the highest number in an array, and perform matrix addition and multiplication using two-dimensional arrays.
At the end of this lecture students should be able to;
Describe the C arrays.
Practice the declaration, initialization and access linear arrays.
Practice the declaration, initialization and access two dimensional arrays.
Apply taught concepts for writing programs.
Here is the program to copy elements of an array into another array in reverse order:
#include <iostream>
using namespace std;
int main() {
int arr1[10], arr2[10];
cout << "Enter 10 integer inputs: ";
for(int i=0; i<10; i++) {
cin >> arr1[i];
}
for(int i=0, j=9; i<10; i++, j--) {
arr2[j] = arr1[i];
}
cout << "Array 1: ";
for(int i=0; i<10; i++) {
cout << arr1[i
The document discusses arrays in C++ programming, including how to declare and initialize arrays, access array elements using indexes, and provides examples of programs that read user input into arrays, calculate sums of array elements, and print arrays in reverse order. It also explains common array sorting algorithms like selection and bubble sort and provides examples of their implementation.
1. The document discusses arrays, including declaring and initializing arrays, passing arrays to functions, and sorting and analyzing array data.
2. Common array operations like finding the mean, median, and mode are demonstrated using arrays of survey response data.
3. Key array concepts covered are declaring arrays with a specified size and type, accessing elements with subscripts, passing entire arrays or individual elements to functions by reference or value, and sorting an array using a bubble sort algorithm.
This document provides an introduction to arrays in C programming. It defines an array as a collection of a fixed number of components of the same type referred to by a single name. Arrays allow storing multiple values in one variable and accessing elements using indexes. The document discusses declaring, initializing, and performing operations on arrays, including multidimensional arrays. It also covers common array concepts like memory allocation, parallel arrays, and avoiding index out of bounds errors by using defined loops instead of hardcoding indexes.
Programming Fundamentals Arrays and Strings imtiazalijoono
This document provides an overview of arrays and strings in C programming. It discusses initializing and declaring arrays of different types, including multidimensional arrays. It also covers passing arrays as arguments to functions. For strings, it explains that strings are arrays of characters that are null-terminated. It provides examples of declaring and initializing string variables, and using string input/output functions like scanf() and printf().
This document discusses data structures and abstract data types. It covers one-dimensional and multidimensional arrays in C++. Arrays allow storing a collection of elements of the same type that can be accessed via an index. The document provides examples of declaring, initializing, accessing, and passing arrays. It also discusses how arrays are stored contiguously in memory. Functions are demonstrated that take arrays as arguments to operate on the elements. Multidimensional arrays generalize this to multiple indices.
This document discusses data structures and abstract data types. It covers one-dimensional and multi-dimensional arrays in C++. Arrays allow storing a collection of elements of the same type that can be accessed via an index. The document provides examples of declaring, initializing, accessing, and passing arrays. It also discusses how arrays are stored contiguously in memory. Multidimensional arrays generalize this to store elements accessed by multiple indices.
The document discusses arrays in C++. It explains one-dimensional and two-dimensional arrays, how to declare, initialize, and access elements of arrays. Key points include arrays storing a collection of like-typed data, being indexed starting from 0, initializing during declaration, and accessing two-dimensional array elements requiring row and column indices. Examples are provided to demonstrate array concepts.
The document discusses arrays in computer science and Java programming. It provides examples of declaring, initializing, and manipulating arrays. Key points include that arrays allow storage of multiple values of the same type using indices, arrays are initialized to contiguous blocks of memory, and common operations on arrays include accessing elements by index and iterating with for loops. An example shows creating an array representing a deck of playing cards by nesting loops to combine rank and suit arrays.
The document discusses arrays in Java, including how to declare and initialize one-dimensional and two-dimensional arrays, access array elements, pass arrays as parameters, and sort and search arrays. It also covers arrays of objects and examples of using arrays to store student data and daily temperature readings from multiple cities over multiple days.
Arrays allow storing multiple values of the same type under one common name. They come in one-dimensional and two-dimensional forms. One-dimensional arrays store elements indexed with a single subscript, while two-dimensional arrays represent matrices with rows and columns indexed by two subscripts. Arrays can be passed to functions by passing their name and size for numeric arrays, or just the name for character/string arrays since strings are null-terminated. Functions can operate on arrays to perform tasks like finding the highest/lowest element or reversing a string.
computer dataA computer is a machine that can be programmed to carry out sequences of arithmetic or logical operations (computation) automatically. Modern digital electronic computers can perform generic sets of operations known as programs. These programs enable computers to perform a wide range of tasks. A computer system is a nominally complete computer that includes the hardware, operating system (main software), and peripheral equipment needed and used for full operation. This term may also refer to a group of computers that are linked and function together, such as a computer network or computer cluster.
A broad range of industrial and consumer products use computers as control systems. Simple special-purpose devices like microwave ovens and remote controls are included, as are factory devices like industrial robots and computer-aided design, as well as general-purpose devices like personal computers and mobile devices like smartphones. Computers power the Internet, which links billions of other computers and users.
Early computers were meant to be used only for calculations. Simple manual instruments like the abacus have aided people in doing calculations since ancient times. Early in the Industrial Revolution, some mechanical devices were built to automate long, tedious tasks, such as guiding patterns for looms. More sophisticated electrical machines did specialized analog calculations in the early 20th century. The first digital electronic calculating machines were developed during World War II. The first semiconductor transistors in the late 1940s were followed by the silicon-based MOSFET (MOS transistor) and monolithic integrated circuit chip technologies in the late 1950s, leading to the microprocessor and the microcomputer revolution in the 1970s. The speed, power and versatility of computers have been increasing dramatically ever since then, with transistor counts increasing at a rapid pace (as predicted by Moore's law), leading to the Digital Revolution during the late 20th to early 21st centuries.
Two-dimensional arrays in C++ allow the creation of arrays with multiple rows and columns. A 2D array is initialized and accessed using two indices, one for the row and one for the column. 2D arrays can be processed using nested for loops, with the outer loop iterating through each row and the inner loop iterating through each column. Functions can accept 2D arrays as parameters, but the number of columns must be specified since arrays are stored in row-major order.
The document discusses arrays, including:
- Single and multidimensional arrays can store multiple values of the same type under a single variable name.
- Arrays use subscript notation (e.g. name[i]) to access individual elements.
- Programs can declare, initialize, and perform operations on array elements to solve problems involving large data sets.
An array is a collection of similar elements that are stored in contiguous memory locations. Arrays in C can have one or more dimensions. One-dimensional arrays are declared with the type of elements, name of the array, and number of elements within brackets (e.g. int marks[30]). Multi-dimensional arrays represent matrices and are declared with the number of rows and columns (e.g. int arr[5][10]). Individual elements within an array are accessed via indices (e.g. arr[2][7]). Pointers in C are related to arrays - the name of an array represents the address of its first element, and pointer arithmetic can be used to access successive elements in an array.
This document discusses arrays in C programming. It begins with an introduction to arrays as structures for storing related data items of the same type. It then covers key topics like declaring and initializing arrays, passing arrays to functions, and sorting and searching arrays. Examples are provided to demonstrate array concepts like initializing character arrays for strings, passing an entire array versus individual elements to functions, and using arrays to calculate the mean, median, and mode of a data set. Functions are defined to implement sorting, searching, and calculating statistical values on arrays.
The document contains 5 questions related to C++ programs for matrix and array operations:
1) Finding the average of numbers in an array
2) Finding the smallest number in a 1D array
3) Adding two matrices
4) Finding the transpose of a matrix
5) Multiplying two matrices (for 2x2 matrices and matrices up to 10x10)
Each question provides the full C++ code to implement the operation and sample input/output.
The document discusses arrays in Java. It begins by defining what an array is - a structured data type that stores a fixed number of elements of the same type. It then covers how to declare and initialize one-dimensional arrays, manipulate array elements using loops and indexes, and how to pass arrays as parameters to methods. The document also discusses arrays of objects and multidimensional arrays.
A matrix is a two-dimensional rectangular data structure that can be created in R using a vector as input to the matrix function. The matrix function arranges the vector elements into rows and columns based on the number of rows and columns specified. Basic matrix operations include accessing individual elements and submatrices, computing transposes, products, and inverses. Matrices allow efficient storage and manipulation of multi-dimensional data.
This document discusses arrays in Java. It covers concepts like array rotation, inserting values into sorted arrays while maintaining sort order, using arrays with String and Graphics methods, initializing and using arrays of objects, avoiding null pointer exceptions, passing command line arguments as arrays, and using the Arrays utility class methods like binarySearch, sort, and toString. Examples are provided to demonstrate array rotation, searching/sorting numbers, and parsing command line arguments.
C++ very good for us jvkbivucyyfuvivucyxtcubobicyxyvinoucyvibivuvuvuviviibivufucuvubibibuvibibbbibibibhibobkvucycuvibibibibobobobobobobobobobibobkgxyvibibihobibibibibibibibibibibibibibibibivibivuvuvuvuvuvbobobohobkbkbobkkbcccvgvgvgctctctctcrctcrcrcrcrcrvtvtvtctcrcrcrcrcrcrcrcrcrcrcrcrcrcrctvfvfcfvfvtcrcrct rvtctvtvtcrcrcrcrcrcrcrcrcrcrcrcrctctcrcrcrcrcrcrcrcrcrcrcrcrvrcrcrcrcrcrcrcrcrcrcrcrcrcrcrcrcrcrctvtvtvtvtvtvtctvbvvgghhhbbbbbhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhuhhuuuhuuuuuuhuuuuuuuuuuuujtvtvfvtvtvtvtvfvtctvtcctcfctcrcfcfcf f f cccccccccfccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
In tube drawing process, a tube is pulled out through a die and a plug to reduce its diameter and thickness as per the requirement. Dimensional accuracy of cold drawn tubes plays a vital role in the further quality of end products and controlling rejection in manufacturing processes of these end products. Springback phenomenon is the elastic strain recovery after removal of forming loads, causes geometrical inaccuracies in drawn tubes. Further, this leads to difficulty in achieving close dimensional tolerances. In the present work springback of EN 8 D tube material is studied for various cold drawing parameters. The process parameters in this work include die semi-angle, land width and drawing speed. The experimentation is done using Taguchi’s L36 orthogonal array, and then optimization is done in data analysis software Minitab 17. The results of ANOVA shows that 15 degrees die semi-angle,5 mm land width and 6 m/min drawing speed yields least springback. Furthermore, optimization algorithms named Particle Swarm Optimization (PSO), Simulated Annealing (SA) and Genetic Algorithm (GA) are applied which shows that 15 degrees die semi-angle, 10 mm land width and 8 m/min drawing speed results in minimal springback with almost 10.5 % improvement. Finally, the results of experimentation are validated with Finite Element Analysis technique using ANSYS.
Ad
More Related Content
Similar to 05_Arrays C plus Programming language22.pdf (20)
This document provides an introduction to arrays in C programming. It defines an array as a collection of a fixed number of components of the same type referred to by a single name. Arrays allow storing multiple values in one variable and accessing elements using indexes. The document discusses declaring, initializing, and performing operations on arrays, including multidimensional arrays. It also covers common array concepts like memory allocation, parallel arrays, and avoiding index out of bounds errors by using defined loops instead of hardcoding indexes.
Programming Fundamentals Arrays and Strings imtiazalijoono
This document provides an overview of arrays and strings in C programming. It discusses initializing and declaring arrays of different types, including multidimensional arrays. It also covers passing arrays as arguments to functions. For strings, it explains that strings are arrays of characters that are null-terminated. It provides examples of declaring and initializing string variables, and using string input/output functions like scanf() and printf().
This document discusses data structures and abstract data types. It covers one-dimensional and multidimensional arrays in C++. Arrays allow storing a collection of elements of the same type that can be accessed via an index. The document provides examples of declaring, initializing, accessing, and passing arrays. It also discusses how arrays are stored contiguously in memory. Functions are demonstrated that take arrays as arguments to operate on the elements. Multidimensional arrays generalize this to multiple indices.
This document discusses data structures and abstract data types. It covers one-dimensional and multi-dimensional arrays in C++. Arrays allow storing a collection of elements of the same type that can be accessed via an index. The document provides examples of declaring, initializing, accessing, and passing arrays. It also discusses how arrays are stored contiguously in memory. Multidimensional arrays generalize this to store elements accessed by multiple indices.
The document discusses arrays in C++. It explains one-dimensional and two-dimensional arrays, how to declare, initialize, and access elements of arrays. Key points include arrays storing a collection of like-typed data, being indexed starting from 0, initializing during declaration, and accessing two-dimensional array elements requiring row and column indices. Examples are provided to demonstrate array concepts.
The document discusses arrays in computer science and Java programming. It provides examples of declaring, initializing, and manipulating arrays. Key points include that arrays allow storage of multiple values of the same type using indices, arrays are initialized to contiguous blocks of memory, and common operations on arrays include accessing elements by index and iterating with for loops. An example shows creating an array representing a deck of playing cards by nesting loops to combine rank and suit arrays.
The document discusses arrays in Java, including how to declare and initialize one-dimensional and two-dimensional arrays, access array elements, pass arrays as parameters, and sort and search arrays. It also covers arrays of objects and examples of using arrays to store student data and daily temperature readings from multiple cities over multiple days.
Arrays allow storing multiple values of the same type under one common name. They come in one-dimensional and two-dimensional forms. One-dimensional arrays store elements indexed with a single subscript, while two-dimensional arrays represent matrices with rows and columns indexed by two subscripts. Arrays can be passed to functions by passing their name and size for numeric arrays, or just the name for character/string arrays since strings are null-terminated. Functions can operate on arrays to perform tasks like finding the highest/lowest element or reversing a string.
computer dataA computer is a machine that can be programmed to carry out sequences of arithmetic or logical operations (computation) automatically. Modern digital electronic computers can perform generic sets of operations known as programs. These programs enable computers to perform a wide range of tasks. A computer system is a nominally complete computer that includes the hardware, operating system (main software), and peripheral equipment needed and used for full operation. This term may also refer to a group of computers that are linked and function together, such as a computer network or computer cluster.
A broad range of industrial and consumer products use computers as control systems. Simple special-purpose devices like microwave ovens and remote controls are included, as are factory devices like industrial robots and computer-aided design, as well as general-purpose devices like personal computers and mobile devices like smartphones. Computers power the Internet, which links billions of other computers and users.
Early computers were meant to be used only for calculations. Simple manual instruments like the abacus have aided people in doing calculations since ancient times. Early in the Industrial Revolution, some mechanical devices were built to automate long, tedious tasks, such as guiding patterns for looms. More sophisticated electrical machines did specialized analog calculations in the early 20th century. The first digital electronic calculating machines were developed during World War II. The first semiconductor transistors in the late 1940s were followed by the silicon-based MOSFET (MOS transistor) and monolithic integrated circuit chip technologies in the late 1950s, leading to the microprocessor and the microcomputer revolution in the 1970s. The speed, power and versatility of computers have been increasing dramatically ever since then, with transistor counts increasing at a rapid pace (as predicted by Moore's law), leading to the Digital Revolution during the late 20th to early 21st centuries.
Two-dimensional arrays in C++ allow the creation of arrays with multiple rows and columns. A 2D array is initialized and accessed using two indices, one for the row and one for the column. 2D arrays can be processed using nested for loops, with the outer loop iterating through each row and the inner loop iterating through each column. Functions can accept 2D arrays as parameters, but the number of columns must be specified since arrays are stored in row-major order.
The document discusses arrays, including:
- Single and multidimensional arrays can store multiple values of the same type under a single variable name.
- Arrays use subscript notation (e.g. name[i]) to access individual elements.
- Programs can declare, initialize, and perform operations on array elements to solve problems involving large data sets.
An array is a collection of similar elements that are stored in contiguous memory locations. Arrays in C can have one or more dimensions. One-dimensional arrays are declared with the type of elements, name of the array, and number of elements within brackets (e.g. int marks[30]). Multi-dimensional arrays represent matrices and are declared with the number of rows and columns (e.g. int arr[5][10]). Individual elements within an array are accessed via indices (e.g. arr[2][7]). Pointers in C are related to arrays - the name of an array represents the address of its first element, and pointer arithmetic can be used to access successive elements in an array.
This document discusses arrays in C programming. It begins with an introduction to arrays as structures for storing related data items of the same type. It then covers key topics like declaring and initializing arrays, passing arrays to functions, and sorting and searching arrays. Examples are provided to demonstrate array concepts like initializing character arrays for strings, passing an entire array versus individual elements to functions, and using arrays to calculate the mean, median, and mode of a data set. Functions are defined to implement sorting, searching, and calculating statistical values on arrays.
The document contains 5 questions related to C++ programs for matrix and array operations:
1) Finding the average of numbers in an array
2) Finding the smallest number in a 1D array
3) Adding two matrices
4) Finding the transpose of a matrix
5) Multiplying two matrices (for 2x2 matrices and matrices up to 10x10)
Each question provides the full C++ code to implement the operation and sample input/output.
The document discusses arrays in Java. It begins by defining what an array is - a structured data type that stores a fixed number of elements of the same type. It then covers how to declare and initialize one-dimensional arrays, manipulate array elements using loops and indexes, and how to pass arrays as parameters to methods. The document also discusses arrays of objects and multidimensional arrays.
A matrix is a two-dimensional rectangular data structure that can be created in R using a vector as input to the matrix function. The matrix function arranges the vector elements into rows and columns based on the number of rows and columns specified. Basic matrix operations include accessing individual elements and submatrices, computing transposes, products, and inverses. Matrices allow efficient storage and manipulation of multi-dimensional data.
This document discusses arrays in Java. It covers concepts like array rotation, inserting values into sorted arrays while maintaining sort order, using arrays with String and Graphics methods, initializing and using arrays of objects, avoiding null pointer exceptions, passing command line arguments as arrays, and using the Arrays utility class methods like binarySearch, sort, and toString. Examples are provided to demonstrate array rotation, searching/sorting numbers, and parsing command line arguments.
C++ very good for us jvkbivucyyfuvivucyxtcubobicyxyvinoucyvibivuvuvuviviibivufucuvubibibuvibibbbibibibhibobkvucycuvibibibibobobobobobobobobobibobkgxyvibibihobibibibibibibibibibibibibibibibivibivuvuvuvuvuvbobobohobkbkbobkkbcccvgvgvgctctctctcrctcrcrcrcrcrvtvtvtctcrcrcrcrcrcrcrcrcrcrcrcrcrcrctvfvfcfvfvtcrcrct rvtctvtvtcrcrcrcrcrcrcrcrcrcrcrcrctctcrcrcrcrcrcrcrcrcrcrcrcrvrcrcrcrcrcrcrcrcrcrcrcrcrcrcrcrcrcrctvtvtvtvtvtvtctvbvvgghhhbbbbbhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhuhhuuuhuuuuuuhuuuuuuuuuuuujtvtvfvtvtvtvtvfvtctvtcctcfctcrcfcfcf f f cccccccccfccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
In tube drawing process, a tube is pulled out through a die and a plug to reduce its diameter and thickness as per the requirement. Dimensional accuracy of cold drawn tubes plays a vital role in the further quality of end products and controlling rejection in manufacturing processes of these end products. Springback phenomenon is the elastic strain recovery after removal of forming loads, causes geometrical inaccuracies in drawn tubes. Further, this leads to difficulty in achieving close dimensional tolerances. In the present work springback of EN 8 D tube material is studied for various cold drawing parameters. The process parameters in this work include die semi-angle, land width and drawing speed. The experimentation is done using Taguchi’s L36 orthogonal array, and then optimization is done in data analysis software Minitab 17. The results of ANOVA shows that 15 degrees die semi-angle,5 mm land width and 6 m/min drawing speed yields least springback. Furthermore, optimization algorithms named Particle Swarm Optimization (PSO), Simulated Annealing (SA) and Genetic Algorithm (GA) are applied which shows that 15 degrees die semi-angle, 10 mm land width and 8 m/min drawing speed results in minimal springback with almost 10.5 % improvement. Finally, the results of experimentation are validated with Finite Element Analysis technique using ANSYS.
ELectronics Boards & Product Testing_Shiju.pdfShiju Jacob
This presentation provides a high level insight about DFT analysis and test coverage calculation, finalizing test strategy, and types of tests at different levels of the product.
☁️ GDG Cloud Munich: Build With AI Workshop - Introduction to Vertex AI! ☁️
Join us for an exciting #BuildWithAi workshop on the 28th of April, 2025 at the Google Office in Munich!
Dive into the world of AI with our "Introduction to Vertex AI" session, presented by Google Cloud expert Randy Gupta.
Passenger car unit (PCU) of a vehicle type depends on vehicular characteristics, stream characteristics, roadway characteristics, environmental factors, climate conditions and control conditions. Keeping in view various factors affecting PCU, a model was developed taking a volume to capacity ratio and percentage share of particular vehicle type as independent parameters. A microscopic traffic simulation model VISSIM has been used in present study for generating traffic flow data which some time very difficult to obtain from field survey. A comparison study was carried out with the purpose of verifying when the adaptive neuro-fuzzy inference system (ANFIS), artificial neural network (ANN) and multiple linear regression (MLR) models are appropriate for prediction of PCUs of different vehicle types. From the results observed that ANFIS model estimates were closer to the corresponding simulated PCU values compared to MLR and ANN models. It is concluded that the ANFIS model showed greater potential in predicting PCUs from v/c ratio and proportional share for all type of vehicles whereas MLR and ANN models did not perform well.
Fluid mechanics is the branch of physics concerned with the mechanics of fluids (liquids, gases, and plasmas) and the forces on them. Originally applied to water (hydromechanics), it found applications in a wide range of disciplines, including mechanical, aerospace, civil, chemical, and biomedical engineering, as well as geophysics, oceanography, meteorology, astrophysics, and biology.
It can be divided into fluid statics, the study of various fluids at rest, and fluid dynamics.
Fluid statics, also known as hydrostatics, is the study of fluids at rest, specifically when there's no relative motion between fluid particles. It focuses on the conditions under which fluids are in stable equilibrium and doesn't involve fluid motion.
Fluid kinematics is the branch of fluid mechanics that focuses on describing and analyzing the motion of fluids, such as liquids and gases, without considering the forces that cause the motion. It deals with the geometrical and temporal aspects of fluid flow, including velocity and acceleration. Fluid dynamics, on the other hand, considers the forces acting on the fluid.
Fluid dynamics is the study of the effect of forces on fluid motion. It is a branch of continuum mechanics, a subject which models matter without using the information that it is made out of atoms; that is, it models matter from a macroscopic viewpoint rather than from microscopic.
Fluid mechanics, especially fluid dynamics, is an active field of research, typically mathematically complex. Many problems are partly or wholly unsolved and are best addressed by numerical methods, typically using computers. A modern discipline, called computational fluid dynamics (CFD), is devoted to this approach. Particle image velocimetry, an experimental method for visualizing and analyzing fluid flow, also takes advantage of the highly visual nature of fluid flow.
Fundamentally, every fluid mechanical system is assumed to obey the basic laws :
Conservation of mass
Conservation of energy
Conservation of momentum
The continuum assumption
For example, the assumption that mass is conserved means that for any fixed control volume (for example, a spherical volume)—enclosed by a control surface—the rate of change of the mass contained in that volume is equal to the rate at which mass is passing through the surface from outside to inside, minus the rate at which mass is passing from inside to outside. This can be expressed as an equation in integral form over the control volume.
The continuum assumption is an idealization of continuum mechanics under which fluids can be treated as continuous, even though, on a microscopic scale, they are composed of molecules. Under the continuum assumption, macroscopic (observed/measurable) properties such as density, pressure, temperature, and bulk velocity are taken to be well-defined at "infinitesimal" volume elements—small in comparison to the characteristic length scale of the system, but large in comparison to molecular length scale
its all about Artificial Intelligence(Ai) and Machine Learning and not on advanced level you can study before the exam or can check for some information on Ai for project
The role of the lexical analyzer
Specification of tokens
Finite state machines
From a regular expressions to an NFA
Convert NFA to DFA
Transforming grammars and regular expressions
Transforming automata to grammars
Language for specifying lexical analyzers
Lidar for Autonomous Driving, LiDAR Mapping for Driverless Cars.pptxRishavKumar530754
LiDAR-Based System for Autonomous Cars
Autonomous Driving with LiDAR Tech
LiDAR Integration in Self-Driving Cars
Self-Driving Vehicles Using LiDAR
LiDAR Mapping for Driverless Cars
"Boiler Feed Pump (BFP): Working, Applications, Advantages, and Limitations E...Infopitaara
A Boiler Feed Pump (BFP) is a critical component in thermal power plants. It supplies high-pressure water (feedwater) to the boiler, ensuring continuous steam generation.
⚙️ How a Boiler Feed Pump Works
Water Collection:
Feedwater is collected from the deaerator or feedwater tank.
Pressurization:
The pump increases water pressure using multiple impellers/stages in centrifugal types.
Discharge to Boiler:
Pressurized water is then supplied to the boiler drum or economizer section, depending on design.
🌀 Types of Boiler Feed Pumps
Centrifugal Pumps (most common):
Multistage for higher pressure.
Used in large thermal power stations.
Positive Displacement Pumps (less common):
For smaller or specific applications.
Precise flow control but less efficient for large volumes.
🛠️ Key Operations and Controls
Recirculation Line: Protects the pump from overheating at low flow.
Throttle Valve: Regulates flow based on boiler demand.
Control System: Often automated via DCS/PLC for variable load conditions.
Sealing & Cooling Systems: Prevent leakage and maintain pump health.
⚠️ Common BFP Issues
Cavitation due to low NPSH (Net Positive Suction Head).
Seal or bearing failure.
Overheating from improper flow or recirculation.
This paper proposes a shoulder inverse kinematics (IK) technique. Shoulder complex is comprised of the sternum, clavicle, ribs, scapula, humerus, and four joints.
The Fluke 925 is a vane anemometer, a handheld device designed to measure wind speed, air flow (volume), and temperature. It features a separate sensor and display unit, allowing greater flexibility and ease of use in tight or hard-to-reach spaces. The Fluke 925 is particularly suitable for HVAC (heating, ventilation, and air conditioning) maintenance in both residential and commercial buildings, offering a durable and cost-effective solution for routine airflow diagnostics.
2. Arrays
• In programming, one of the frequently problem is
to handle similar types of data. Consider this
situation: You have to store marks of more than
one student depending upon the input from user.
These types of problem can be handled in C++
programming using arrays.
• An array can be thought of as a collection of
numbered boxes each containing one data item.
The number associated with the box is the index
of the item. The index must be an integer and
indicates the position of the element in the array.
2
3. • Instead of declaring individual variables, such
as number0, number1, ..., and number99, you
declare one array variable such as numbers and
use numbers[0], numbers[1], and ...,
numbers[99] to represent individual variables.
A specific element in an array is accessed by
an index.
• Notice that the first element of an array called
foo is foo[0] not foo[1]. These elements are
numbered from 0. In C++, the first element in
an array is always numbered with a zero (not a
one), no matter its length.
3
4. Declaring Arrays
• Like a regular variable, an array must be declared
before being used. To declare an array in C++, the
programmer specifies the type of the elements
and the number of elements required by an array.
For examples:
• int myarray[10];
• The above statement declares an array called
myarray. This array contains 10 elements of type
integer. The first element will be myarray[0] and
the last element will be myarray[9].
4
5. • When declaring an array, we saw that you must
specify the number of items that the array is made
of. An alternative is to define a constant prior to
declaring the array and use that constant to hold
the dimension of the array. Here is an example:
• const int numberOfItems = 5;
• double distance[numberOfItems] ;
• Note that numberOfItems must be a const. So the
following code will give an error.
• int ItemsNumber = 5;
• double distance[ItemsNumber] ;
• // Wrong, ItemsNumber must be constant
5
6. Initializing arrays
• Here ia an examples of declaring and
initializing arrays:
• int arr[ 6 ] = { 7 , 2 , 4 , 9 , 10 , 3};
• int arr[ ] = { 7 , 2 , 4 , 9 , 10 , 3};
• int arr[ 10 ] = { 7 , 2 , 4 , 9 , 10 , 3};
• int arr[ 6 ] = { };
6
7. Accessing the values of an array
• The following statement stores the value 75 in the third
element of foo:
• foo[2] = 75;
• The following copies the value of the third element
of foo to a variable called x:
• x = foo[2];
• Notice that the third element of foo is specified foo[2],
since the first one is foo[0], the second one is foo[1],
and therefore, the third one is foo[2].
7
8. Important
• C++ does not check that the subscript that is
used to reference an array element actually lies
in the subscript range of the array.
• int arr[10];
• arr[17] = 22;
• This would lead to the program being
terminated by the operating system.
Alternatively it might assign a value to that
location, changing the value of the variable in
your program which is actually associated with
that memory location.
8
9. The size of an array
• Imagine you declare an array as follows:
• int arr[] = {18, 42, 25, 12, 34, 15, 63, 72, 92,
26, 26, 12, 127, 4762, 823, 236, 84, 5};
• Instead of counting the number of members of
this array, you can use the sizeof operator as
follows:
• int NumberOfItemsOfTheArray =
sizeof(arr)/sizeof(int);
9
10. Multidimensional arrays
• Multidimensional arrays can be described as
"arrays of arrays". For example, a two
dimensional array can be imagined as a two-
dimensional table made of elements, all of
them of a same uniform data type.
•
10
11. • The C++ syntax for this two dimensional array
is:
• int jimmy[3][5];
• the way to reference the second element
vertically and fourth horizontally in an
expression would be:
• jimmy[1][3] = 88;
• Multidimensional arrays are not limited to two
dimensions). They can contain as many
dimensions as needed.
11
12. Example 1
• One of the regular operations performed on an
array consists of adding the values of the
members to produce a sum.
12
13. int main()
{
int number[10] = {20,14,6,28,11,13,15,17,4,25};
int sum = 0;
for( int i = 0; i < 10; i++ )
{
sum += number[i];
}
cout << “Sum of numbers is " << sum << "n";
return 0;
}
13
14. Example 2
• Another type of operation regularly performed
on an array consists of looking for a value held
by one of its members. For example, you can
try to know if one of the members holds a
particular value you are looking for.
14
15. int main()
{
int numbers[] = {8, 25, 36, 44, 52, 60, 75, 89};
int f, i, m = 8;
cout << "Enter a number to search: ";
cin >> f;
for (i = 0; (i < m) && (numbers[i] != f); i++)
continue;
if (i == m) cout << f << " is not in the list n";
else cout << f << " is the " << i + 1
<< "th element in the list n";
return 0;
}
15
16. Example 3
• One of the most regular operations performed
consists of comparing the values of different
members to get the lowest value of the
members
16
17. int main()
{
int numbers[] = {81, 25, 36, 44, 5, 60, 75, 89};
int min = numbers[0];
for (int i = 1; i < 8; ++i)
if (numbers[i] < min) min = numbers[i];
cout << “Minimum = " << min << endl;
return 0;
}
17
18. Problem 1
Write a program to read 30 numbers and to print
these numbers in a reverse order
18
19. int main(void)
{
int a[30] , k ;
for(k = 0 ; k <= 29 ; k++)
{
cout << "Enter an integer nuumber: ";
cin >> a[k] ;
}
cout << "n The numbers in reverse order: " ;
for(k = 29 ; k >= 0 ; k--) cout << a[k] << "t";
return 0;
}
19
20. Problem 2
Write a program to read 10 numbers, calculate
the average, then print the numbers which are
greater the average. Print also how many of these
numbers are greater than the average
20
21. void main(void)
{
int k , a[10] , sum , counter ;
float aver ;
sum = 0 ;
cout << "Please enter 10 integer numbers: " ;
for(k = 0 ; k <= 9 ; k++)
{
cin >> a[k] ;
sum = sum + a[k] ;
}
aver = sum / 10.0 ;
cout << "Average = " << aver << "n";
21
22. cout << "Numbers greater than average are: ";
counter = 0 ;
for(k = 0 ; k <= 9 ; k++)
if(a[k] > aver)
{
counter++ ;
cout << a[k] << "t" ;
}
cout << "n We have " << counter <<
"numbers greater than average n";
}
22
23. Problem 3
Write a program to add two matrices, each
matrix has dimensions 4*6
23
24. int main(void)
{
int a[4][6] , b[4][6] , sum[4][6] , r , c ;
cout << "Enter first matrix: n";
for(r = 0 ; r <= 3 ; r++)
for(c = 0 ; c <= 5 ; c++)
{
cout << "a["<<r<<"]["<<c<<"]=" ;
cin >> a[r][c] ;
}
24
30. • Arrays often need to be sorted in either ascending
or descending order. There are many well known
methods for doing this. This section briefly
describes one of the easiest sorting methods called
the selection sort.
• The basic idea of selection sort is:
• For each index position I in turn:
1. Find the smallest data value in the array from
positions I to (Length - 1), where "Length" is the
number of data values stored.
2. Exchange the smallest value with the value at
position I.
30
31. void main(void)
{
int y[10] , min , minloc , r , k , temp ;
cout << "Please enter 10 numbers: ";
for(r = 0 ; r <= 9 ; r++) cin >> y[r] ;
for(k = 0 ; k <= 8 ; k++) {
min = y[k] ; minloc = k ;
for(r = k+1 ; r <= 9 ; r++)
if(min > y[r] ) { min = y[r] ; minloc = r ; }
temp = y[k]; y[k] = y[minloc]; y[minloc] = temp;
}
for(r = 0 ; r <= 9 ; r++) cout << y[r] << "t" ;
}
31
32. Problem 6
• Write a program to add 2 arrays with
dimension 10 using 3 functions (read_array,
add_arrays, write_array). Do not use any
global variables
32
33. Problem 7
Write a program to read 10 numbers and test if
these numbers are sorted or not
33
34. int main()
{
int num[10] , res , k , count1 = 0 , count2 = 0 , length = 10;
for(k = 0 ; k < =length-1 ; k++)
{
cout << "Enter term number " << k << " : ";
cin >> num[k] ;
}
for(k = 0 ; k <= length-2 ; k++)
{
if(pt[k] > pt[k+1]) counter1++ ;
if(pt[k] < pt[k+1]) counter2++ ;
}
34
36. Problem 8
• Write a method to search for a number in an
ordered list using Linear search. Assume that
the list contains numbers -10, -3, 7, 12, 13, 18,
20, 22, 24, and 25.
•
36
37. void main(void)
{
int key , res , j ;
int y[ ] = {-10, -3, 7, 12, 13, 18, 20, 22, 24, 25 };
cout << "Please enter the key number: ";
cin >> key ;
for(j = 0 ; j <= 9 ; j++)
if(y[j] == key) break ;
if(j == 10) cout << "Key does not exist n" ;
else cout << " Key exists at " << j <<"n";
}
37
38. Problem 9
• Write 2 programs to print the term number 10
from the series 0,1,1,2,3,5,8,........... using
1: loop without array, 2: loop with array.
38
39. void main(void) //First solution
{
int k , a , b , c ;
a = 0 ; b = 1 ;
for(k = 3 ; k <= 10 ; k++)
{
c = a + b ;
a = b ;
b = c ;
}
cout << c ;
}
39
41. Problem 10
• Write 2 programs (one using array and the
other without using array) to read a date: year,
month, and day. Then calculate and print how
many days passed from the beginning of this
year to the specified date.
41
42. void main()
{
int mon[] = {31,28,31,30,31,30,31,31,30,31,30,31};
int d , m , y , days ;
cout << "Enter day month year: ";
cin >> d >> m >> y ;
days = 0 ;
for(int k = 0 ; k < m-1 ; k++)
days = days + mon[k] ;
if((m > 2)&&(y%4 == 0)) days++;
days = days + d ;
cout << "n Number of days = %d n" << days;
}
42
43. void main(void)
{
int d , m , y , days ;
cout << "Enter day month year: ";
cin >> d >> m >> y ;
days = 0 ;
switch (m)
{
case 12 :days += 30 ;
case 11:days += 31 ;
case 10:days += 30 ;
case 9:days += 31 ;
case 8:days += 31 ;
43
44. case 7:days += 30 ;
case 6: days += 31 ;
case 5: days += 30 ;
case 4: days += 31 ;
case 3: if(y%4 == 0) days+= 29 ;
else days+= 28 ;
case 2: days += 31 ;
case 1: days += d ; break ;
default: printf("Wrong month numbern");
}
cout << "n Number of days = %d n" << days;
}
44
45. Problem 11
• Write a program to reverse elements of an
array of length 10. For example, if the data of
the array are already sorted in an ascending
order, it will be after executing the program in
descending order. Assume any data in the
array.
45
47. Problem 12
Write a to calculate maximum, minimum,
average, variance, and deviation of these 10
numbers: 5.3, 7.2, 9.4, 8.3, 7.6, 10.2, 1.4, 2.3,
8.7, 9.1
47
48. Problem 13
• Write a program to print 10 random numbers
with value less than 100.
48
49. void main(void)
{
int k, num;
for (k = 1; k <= 10; k++)
{
num = rand() % 100;
cout << num << "t";
}
}
49
50. • If we run the program it will print these numbers
which are random numbers.
• 41 67 34 0 69 24 78 58
62 64
• The problem that if we rerun the program again it
will print the same numbers as follows
• 41 67 34 0 69 24 78 58
62 64
• To overcome this program we will use the
function srand(seed) before using the function
rand. Srand function will help us to get another
sequence of numbers depends on the value of
seed. For example, if we execute the following
program
50
51. #include < time.h >
void main(void)
{
srand(time(NULL));
int k, num;
for (k = 1; k <= 10; k++)
{
num = rand() % 100;
cout << num << "t";
}
}
51
52. Problem 14
• Write a program to generate 10 integer
numbers with values less than 20. The
numbers must be unrepeated. So, any number
must not be printed more than one time.
52
53. Problem 15
• Write a program to print 10 unrepeated sorted
(ascending) random integer numbers with
values less than 20.
53
54. Problem 16
• Write a program to multiply 2 matrices, the
first has dimensions 4*6, and the second has
dimensions 6*5
54
55. Problem 17
• Write a program to read scores of 20 students
in 5 subjects. Calculate the average score of
each student, and the succeeding ratio of each
subject.
55
56. Problem 18
• Write a program to read scores of 10 students
in mid term exam. Then, read scores of these
students in final exam. Calculate the total score
and the grade of each student.
56