This document discusses C programming loops and provides examples of programs using for, while, do-while, and nested loops. It includes the theory, syntax, flowcharts, algorithms, and programs for each type of loop. Several programs are provided as examples, such as one to display characters and their ASCII values using a for loop, one to calculate the factorial of a number using a while loop, one to find the Fibonacci series using a do-while loop, and one to find prime numbers using a nested loop. Students are provided learning objectives for each example to learn how to write the loop syntax, draw flowcharts, write algorithms, and implement the programs using the specified loop type.
The document discusses C programming concepts related to decision control statements like if, if-else, else-if ladder, and nested if-else. It provides examples of code and flowcharts for programs using each type of decision statement to check conditions and display outputs. The document is divided into multiple sections for each decision statement type, with theory, an example program, inputs/outputs, and practice problems in each section.
This document discusses using switch-case statements in C programming to perform mathematical operations. It provides the syntax for switch-case, an example of a program that takes two numbers and an operator as input to perform addition, subtraction, multiplication and division. The program is presented along with its flowchart and algorithm. The learning objectives are to write switch-case syntax, draw flowcharts, write algorithms and programs using switch-case statements.
This document provides instructions for writing a C program to count the vowels, consonants, digits, and whitespace in a string. It begins by explaining how to declare, initialize, read, and manipulate strings in C. It then presents the algorithm and full C program to iterate through a string, check each character, and increment the appropriate counter. The program takes a string as input and outputs the count of each type of character. Examples of additional string programs are provided for practice.
This document discusses using structures in C programming to store student records. It defines a student structure with roll number, name, and marks members. A program is provided that uses a structure array to store records for 10 students, reading input and then displaying the stored information. The key aspects of defining structures, declaring structure variables, accessing structure members, and allocating structure memory are explained. Sample problems are given to practice using structures to store book information and add distances.
This document discusses writing a C program to add two matrices using a two-dimensional array. It includes the theory of multi-dimensional arrays in C, a flowchart showing the process of adding matrices, an algorithm describing the steps, sample code to add two 2x2 matrices, example input/output, and concludes by stating the learning outcomes of understanding how to declare and use multi-dimensional arrays to solve problems like adding matrices.
This document provides information on writing a C program to find the largest number in an array. It defines arrays and how they are declared and initialized. The document includes a flowchart and algorithm for the problem. It also includes the full C program code to find the largest number in an array by getting array size and elements from user input and iterating through the array to find the largest. It concludes by stating the learning outcomes were to declare arrays, draw a flowchart, write an algorithm, and write the program.
This document provides an introduction to the C programming language. It covers C program structure, variables, expressions, operators, input/output, loops, decision making statements, arrays, strings, functions, pointers, structures, unions, file input/output and dynamic memory allocation. The document uses examples and explanations to introduce basic C syntax and concepts.
VTU PCD Model Question Paper - Programming in CSyed Mustafa
This document contains Prof. A. Syed Mustafa's answers to a model question paper for the Programming in C and Data Structures course. It includes answers to questions on C variable names, the printf statement, finding the area of a triangle using Heron's formula, determining the size of data types using sizeof, relational and logical operators in C, nested if-else statements, finding the largest of three numbers, do-while loops and calculating factorials, finding the GCD of two numbers using a ternary operator and for loop, and a basic calculator program using a switch statement.
The document provides an overview of the C programming language. It discusses the history and creation of C, key features of C like portability and efficiency, C program structure, data types in C including integer, floating point, and character types, and variable naming conventions. It also covers basic C programs and examples to illustrate the use of data types, operators, and input/output functions in C.
VTU 1ST SEM PROGRAMMING IN C & DATA STRUCTURES SOLVED PAPERS OF JUNE-2015 & ...vtunotesbysree
The document contains solved question papers from June 2015 and December 2015 for Programming in C & Data Structures examinations. It includes questions ranging from basic C programming concepts like data types, operators, decision making and looping statements to more advanced topics such as arrays, strings, structures, files and pointers. For each question, the relevant concept is explained and examples are provided. Solutions for some programming problems involving simple calculations, palindrome checks and file handling are also presented.
The document discusses the basics of C programming language including the need for programming languages, problem solving, algorithms, flowcharts, pseudocode, data types, variables, operators, expressions, conditional statements, and arrays. It explains the basic structure of a C program, functions like main(), return statement, preprocessor directives, different types of variables and operators used in C programming.
This chapter discusses fundamental concepts of C programming language and basic input/output functions. It covers C development environment, C program structure including main functions and statements, basic data types, input/output functions like printf and scanf, and common programming errors.
This document contains Prof. A. Syed Mustafa's answers to a model question paper for the Programming in C and Data Structures course. It includes answers to questions on C variable names, the printf statement, finding the area of a triangle using Heron's formula, determining the size of data types using sizeof, relational and logical operators in C, nested if-else statements, finding the largest of three numbers, do-while loops and calculating factorials, finding the GCD of two numbers using a ternary operator and for loop, and a basic calculator program using a switch statement.
An operator is a symbol that tells the compiler to perform specific mathematical or logical manipulations.
C language supports a rich set of built-in operators. An operator is a symbol that tells the compiler to perform certain mathematical or logical manipulations. Operators are used in program to manipulate data and variables.
Operators are elements in C# that are applied to operands in expressions or statements. Unary operators take one operand, like increment (++), while binary operators take two operands, such as arithmetic operators (+, -, *, /). The conditional operator (?:) is the sole ternary operator, taking three operands. Some common operators are assignment (=), arithmetic, comparison, conditional (&&, ||), ternary (?:), and null coalescing (??). Operator precedence and associativity determine the order of evaluation in expressions with multiple operators. Parentheses can be used to override precedence.
This document discusses arrays in C programming. It defines one-dimensional and two-dimensional arrays. One-dimensional arrays store elements in a list using one subscript, while two-dimensional arrays store elements in a row-column format using two subscripts. The document lists the advantages of arrays as allowing storage of known number of elements in contiguous memory locations, and the disadvantages as fixed size and inability to resize. It also discusses initializing array elements, accessing array elements using indexes, and traversing arrays by accessing each element once.
This document contains information about the Introduction to C Programming course at Dhanalakshmi College of Engineering. It includes 20 multiple choice questions about C programming concepts like data types, variables, operators, input/output statements, decision making statements, and loops. Sample code is provided to demonstrate various C programming constructs like if/else statements, while loops, and functions.
The document discusses various topics related to programming in C including data types, constants, expressions, decision making statements, and a sample C program structure. It provides 20 questions with explanations on these topics. It also includes a sample C program to calculate the sum of 10 non-negative numbers entered by the user, illustrating the use of various data types in C programming.
C tokens are the basic building blocks of a C program and include keywords, identifiers, constants, separators, and operators. There are five types of tokens: keywords which have fixed meanings; identifiers which are user-defined names; constants which are fixed values; separators which separate statements; and operators which perform operations. Some examples of tokens in C are keywords like int, identifiers like x, y, separators like { and }, and operators like +.
Constants refer to fixed values that cannot be altered during program execution. They include integer, floating point, character, and string literals. Constants are defined using the #define preprocessor or const keyword and are treated like regular variables except their values cannot change. Common operators in C include arithmetic, relational, logical, and bitwise operators that perform math, comparison, logic and bit manipulation functions.
The document discusses pointers and strings in C programming. It provides definitions for strings and pointers, lists common string and pointer functions like strlen(), strcat(), and explains pointer arithmetic. Examples are given to illustrate string initialization, comparing strings, reversing a string, and performing arithmetic operations on pointers. Key applications of pointers include implementing data structures, dynamic memory allocation, passing arguments by reference, and system level programming.
This document provides an overview of a sample C program and explanations of key concepts:
1. The sample "Hello World" program prints that message to the screen using the printf function. It demonstrates the required main function and use of a pre-defined function.
2. Key concepts discussed include functions, parameters, header files, data types, expressions, assignment statements, increment/decrement operators, and input/output statements.
3. Input is received using built-in functions, while output display is handled by functions like printf that use format specifiers to control output formatting.
The document discusses various control flow statements in C programming such as decision control statements (if, if-else, switch-case), looping statements (for, while, do-while loops), break, continue, goto, and functions. It provides examples of using each statement type and explains their syntax and usage. Key aspects like scope of variables, parameter passing methods (call by value, call by reference), and storage classes (auto, static, extern) related to functions are also covered in the document.
C programming is a widely used programming language. The document provides an overview of key concepts in C programming including variables, data types, operators, decision and loop control statements, functions, pointers, arrays, strings, structures, and input/output functions. It also provides examples to illustrate concepts like arrays, strings, functions, pointers, and structures. The main function is the entry point for all C programs where code execution begins.
This document contains a unit on functions from an Introduction to C Programming course. It includes definitions of functions, advantages of functions, types of parameters, recursion, and examples of functions. It also provides sample questions and answers about functions for a 2 mark quiz.
This document provides an introduction to the C programming language. It discusses key topics like data types in C, variables, operators, expressions, control flow statements, functions, and algorithms. C was created in the early 1970s at Bell Labs and is a general purpose programming language widely used for system programming. It is compact, portable and allows direct access to memory. The document outlines why C is a useful language to learn and provides examples of basic C syntax and concepts.
This document provides information on writing a C program to find the largest number in an array. It defines arrays and how they are declared and initialized. The document includes a flowchart and algorithm for the problem. It also includes the full C program code to find the largest number in an array by getting array size and elements from user input and iterating through the array to find the largest. It concludes by stating the learning outcomes were to declare arrays, draw a flowchart, write an algorithm, and write the program.
This document provides an introduction to the C programming language. It covers C program structure, variables, expressions, operators, input/output, loops, decision making statements, arrays, strings, functions, pointers, structures, unions, file input/output and dynamic memory allocation. The document uses examples and explanations to introduce basic C syntax and concepts.
VTU PCD Model Question Paper - Programming in CSyed Mustafa
This document contains Prof. A. Syed Mustafa's answers to a model question paper for the Programming in C and Data Structures course. It includes answers to questions on C variable names, the printf statement, finding the area of a triangle using Heron's formula, determining the size of data types using sizeof, relational and logical operators in C, nested if-else statements, finding the largest of three numbers, do-while loops and calculating factorials, finding the GCD of two numbers using a ternary operator and for loop, and a basic calculator program using a switch statement.
The document provides an overview of the C programming language. It discusses the history and creation of C, key features of C like portability and efficiency, C program structure, data types in C including integer, floating point, and character types, and variable naming conventions. It also covers basic C programs and examples to illustrate the use of data types, operators, and input/output functions in C.
VTU 1ST SEM PROGRAMMING IN C & DATA STRUCTURES SOLVED PAPERS OF JUNE-2015 & ...vtunotesbysree
The document contains solved question papers from June 2015 and December 2015 for Programming in C & Data Structures examinations. It includes questions ranging from basic C programming concepts like data types, operators, decision making and looping statements to more advanced topics such as arrays, strings, structures, files and pointers. For each question, the relevant concept is explained and examples are provided. Solutions for some programming problems involving simple calculations, palindrome checks and file handling are also presented.
The document discusses the basics of C programming language including the need for programming languages, problem solving, algorithms, flowcharts, pseudocode, data types, variables, operators, expressions, conditional statements, and arrays. It explains the basic structure of a C program, functions like main(), return statement, preprocessor directives, different types of variables and operators used in C programming.
This chapter discusses fundamental concepts of C programming language and basic input/output functions. It covers C development environment, C program structure including main functions and statements, basic data types, input/output functions like printf and scanf, and common programming errors.
This document contains Prof. A. Syed Mustafa's answers to a model question paper for the Programming in C and Data Structures course. It includes answers to questions on C variable names, the printf statement, finding the area of a triangle using Heron's formula, determining the size of data types using sizeof, relational and logical operators in C, nested if-else statements, finding the largest of three numbers, do-while loops and calculating factorials, finding the GCD of two numbers using a ternary operator and for loop, and a basic calculator program using a switch statement.
An operator is a symbol that tells the compiler to perform specific mathematical or logical manipulations.
C language supports a rich set of built-in operators. An operator is a symbol that tells the compiler to perform certain mathematical or logical manipulations. Operators are used in program to manipulate data and variables.
Operators are elements in C# that are applied to operands in expressions or statements. Unary operators take one operand, like increment (++), while binary operators take two operands, such as arithmetic operators (+, -, *, /). The conditional operator (?:) is the sole ternary operator, taking three operands. Some common operators are assignment (=), arithmetic, comparison, conditional (&&, ||), ternary (?:), and null coalescing (??). Operator precedence and associativity determine the order of evaluation in expressions with multiple operators. Parentheses can be used to override precedence.
This document discusses arrays in C programming. It defines one-dimensional and two-dimensional arrays. One-dimensional arrays store elements in a list using one subscript, while two-dimensional arrays store elements in a row-column format using two subscripts. The document lists the advantages of arrays as allowing storage of known number of elements in contiguous memory locations, and the disadvantages as fixed size and inability to resize. It also discusses initializing array elements, accessing array elements using indexes, and traversing arrays by accessing each element once.
This document contains information about the Introduction to C Programming course at Dhanalakshmi College of Engineering. It includes 20 multiple choice questions about C programming concepts like data types, variables, operators, input/output statements, decision making statements, and loops. Sample code is provided to demonstrate various C programming constructs like if/else statements, while loops, and functions.
The document discusses various topics related to programming in C including data types, constants, expressions, decision making statements, and a sample C program structure. It provides 20 questions with explanations on these topics. It also includes a sample C program to calculate the sum of 10 non-negative numbers entered by the user, illustrating the use of various data types in C programming.
C tokens are the basic building blocks of a C program and include keywords, identifiers, constants, separators, and operators. There are five types of tokens: keywords which have fixed meanings; identifiers which are user-defined names; constants which are fixed values; separators which separate statements; and operators which perform operations. Some examples of tokens in C are keywords like int, identifiers like x, y, separators like { and }, and operators like +.
Constants refer to fixed values that cannot be altered during program execution. They include integer, floating point, character, and string literals. Constants are defined using the #define preprocessor or const keyword and are treated like regular variables except their values cannot change. Common operators in C include arithmetic, relational, logical, and bitwise operators that perform math, comparison, logic and bit manipulation functions.
The document discusses pointers and strings in C programming. It provides definitions for strings and pointers, lists common string and pointer functions like strlen(), strcat(), and explains pointer arithmetic. Examples are given to illustrate string initialization, comparing strings, reversing a string, and performing arithmetic operations on pointers. Key applications of pointers include implementing data structures, dynamic memory allocation, passing arguments by reference, and system level programming.
This document provides an overview of a sample C program and explanations of key concepts:
1. The sample "Hello World" program prints that message to the screen using the printf function. It demonstrates the required main function and use of a pre-defined function.
2. Key concepts discussed include functions, parameters, header files, data types, expressions, assignment statements, increment/decrement operators, and input/output statements.
3. Input is received using built-in functions, while output display is handled by functions like printf that use format specifiers to control output formatting.
The document discusses various control flow statements in C programming such as decision control statements (if, if-else, switch-case), looping statements (for, while, do-while loops), break, continue, goto, and functions. It provides examples of using each statement type and explains their syntax and usage. Key aspects like scope of variables, parameter passing methods (call by value, call by reference), and storage classes (auto, static, extern) related to functions are also covered in the document.
C programming is a widely used programming language. The document provides an overview of key concepts in C programming including variables, data types, operators, decision and loop control statements, functions, pointers, arrays, strings, structures, and input/output functions. It also provides examples to illustrate concepts like arrays, strings, functions, pointers, and structures. The main function is the entry point for all C programs where code execution begins.
This document contains a unit on functions from an Introduction to C Programming course. It includes definitions of functions, advantages of functions, types of parameters, recursion, and examples of functions. It also provides sample questions and answers about functions for a 2 mark quiz.
This document provides an introduction to the C programming language. It discusses key topics like data types in C, variables, operators, expressions, control flow statements, functions, and algorithms. C was created in the early 1970s at Bell Labs and is a general purpose programming language widely used for system programming. It is compact, portable and allows direct access to memory. The document outlines why C is a useful language to learn and provides examples of basic C syntax and concepts.
This document provides information about programming in C including:
1) An introduction to algorithms, data types, operators, expressions, input/output, and control flow statements in C like if/else and loops.
2) Details about variables, data types, operators, expressions, and program statements in C.
3) Explanations of selection statements like if/else and switch, iteration statements like for, while and do-while loops, and jump statements like break, continue and return in C programming.
The document discusses various operators and control structures in C programming language. It describes different types of operators like arithmetic, relational, logical, bitwise, assignment etc. and provides examples of their usage. It also explains control structures like if-else, nested if, else-if ladder and switch case statements that allow conditional execution of code in C. Various type conversions and precedence rules for operators are also covered in the document.
datypes , operators in c,variables in clanguage formatting input and out putMdAmreen
A data-type in C programming is a set of values and is determined to act on those values.
C provides various types of data-types which allow the programmer to select the appropriate type for the variable to set its value.
The data-type in a programming language is the collection of data with values having fixed meaning as well as characteristics. Some of them are an integer, floating point, character, etc.
Usually, programming languages specify the range values for given data-type.
The document provides information about C programming language. It discusses that C is a general-purpose programming language widely used to develop operating systems and applications. It originated from Bell Labs in the 1970s as a system implementation language for Unix. Key elements of C like variables, constants, operators, control structures are explained. Variables can change value during program execution while constants remain fixed. Operators perform operations on operands. Control structures include sequence, decision making (if, if-else, nested if), and loops (for, while, do-while). Programming design tools like algorithms, pseudo code and flowcharts are used before actual development.
The document provides information on the fundamentals of the C programming language. It discusses:
- The key features of C including modularity, extensibility, and portability.
- The typical structure of a C program including comments, global declarations, main functions, and subprograms.
- Core C concepts such as data types, variables, operators, expressions, and type conversion.
- Important functions for input/output like printf that are used to display output in C programs.
The document discusses various topics related to tokens, variables, data types, and operators in C programming. It defines tokens as the smallest elements identified by the compiler, such as keywords, identifiers, string literals, and operators. It describes different variable types like local variables, global variables, and static variables. It also explains various data types in C like integer, float, char, etc and their sizes and ranges. Finally, it discusses various arithmetic, relational, logical, and assignment operators in C and their precedence.
This document provides an overview of the C# programming language, covering topics such as its features, environment, program structure, data types, variables, operators, decision making, loops, methods, and encapsulation. It defines key C# concepts and provides examples of C# code.
This document provides information on C programming concepts including data types, operators, functions, and basic program structure.
It defines key concepts like variables, data types (integer, float, character), operators (arithmetic, relational, logical), functions (printf, scanf), and basic program anatomy with main(), I/O statements, and comments. Examples are given to illustrate variable declaration and usage, arithmetic operations, type casting, and basic programs to read/write and perform calculations.
The document discusses various operators in the C programming language. It describes arithmetic, assignment, relational, logical, conditional, and type casting operators. It provides examples to demonstrate how each operator works. It also covers decision control structures like if, if-else, nested if, and switch statements that allow conditional execution of code in C based on different conditions.
The C programming language was developed in the 1970s and remains widely used today. It is an efficient, flexible language suitable for system software like operating systems as well as application programs. C has basic elements like keywords, constants, variables, and operators. It defines fundamental data types like integers, floating-point numbers, and characters. C supports a variety of operators for arithmetic, relational, logical, and assignment operations. Variables and constants are declared and defined using rules for naming identifiers and representing numeric, character, string, and escape sequence values.
The document discusses control structures and functions in C programming. It defines variables and data types in C. It describes different control structures like sequence, selection, and repetition. It explains basic loops like while, for, and do-while loops. It also discusses functions, how to define functions, pass parameters, and return values. It provides examples of string handling and manipulation functions in C.
This document provides guidelines for designing and implementing a quiz application on mobile. It outlines steps to display quiz questions and multiple choice answers using buttons to navigate between questions. It also describes validating all questions when the submit button is clicked and displaying the results in a new activity using intents. Strings arrays are recommended to store questions and answers. The application should use two activities, one for the main quiz interface and another for displaying results.
This document provides instructions for students to implement and present a mobile application mini-project. Students must submit a synopsis of the project concept and design. They will then present the overall mini-project to the class, demonstrating the app idea, implementation concepts, and a walkthrough on an actual device. The presentation should be 10-15 minutes and include submitting the full code, synopsis, and presentation as the assignment. All group members must contribute to both the project development and final presentation.
(1) The document discusses designing and implementing two mobile applications: one using shared preferences to change the theme of the app between light and dark mode, and one using SQLite to perform CRUD operations on a faculty information database.
(2) For the shared preferences app, the design involves buttons to switch between themes, saving the selected theme in shared preferences so it persists after closing the app.
(3) For the SQLite app, the design involves activities and layouts for home, adding, editing, and displaying faculty records from a database using a DBHelper class to perform CRUD operations on the table.
This document describes how to design a mobile application to read and write contents to flat files on the internal and external memory of a mobile device. The application will allow users to enter text, click a button to write the text to a file saved on the internal or external memory, and click another button to read and display the contents of that file. The document provides steps for the design, explains that the file will be saved in different locations for internal versus external memory, and includes references to figures showing how to view the files using DDMS.
This document provides guidelines for a mini mobile application development project. Students are instructed to propose a new Android application idea that can be implemented within 10-15 hours. The application synopsis should include the concept, design layout, and database details. The project should apply concepts learned in course and follow a software development lifecycle process such as SDLC.
The document provides guidelines for designing and implementing a mobile application using notification concepts. It outlines steps to create an interface with a text view and stop button. It also describes creating a thread to increment a counter in the background and trigger a notification when the stop button is pressed. The notification would navigate to another activity displaying the final counter value. Key aspects covered include using NotificationCompat.Builder to set notification details like icon, title, and text and navigating to an activity when the user taps the notification.
This document discusses designing and implementing a mobile application using a bound service. It defines what a service is, noting that it runs in the main thread, does not provide a UI, and can perform background operations. It explains the two forms of services - started services that perform a single operation, and bound services that offer a client-server interface across processes. The design section outlines steps to create a new Android project called BoundServiceDemo, design the layout, create a CounterService class extending Binder, and register the service in the Android manifest.
AsyncTask allows performing background operations and publishing results on the UI thread without having to manipulate threads and handlers. It defines three generic types - Params for parameters, Progress for progress updates, and Result for output - and four steps - onPreExecute, doInBackground, onProgressUpdate, and onPostExecute. doInBackground runs in a background thread and performs long-running tasks, while onProgressUpdate updates the UI thread as the task progresses.
1) The document provides steps to design and implement a login form mobile application using Android UI elements.
2) It describes designing a login screen to accept username and password and include submit and reset buttons.
3) On clicking submit, a message would be displayed based on validation, and on reset the username and password fields would be cleared.
This document discusses mobile application development. It is classified into logical and physical landscapes. The logical landscape describes how mobility benefits consumers and enterprises, while the physical landscape depicts the infrastructure components like mobile devices, platforms, and app stores. It also describes the three main approaches to developing mobile apps: native, web, and hybrid. Native apps are developed for a specific platform using native APIs, while web apps are developed with web technologies and run in a mobile browser. Hybrid apps combine features of native and web apps, allowing the same codebase to work across multiple platforms.
Concept of Problem Solving, Introduction to Algorithms, Characteristics of Algorithms, Introduction to Data Structure, Data Structure Classification (Linear and Non-linear, Static and Dynamic, Persistent and Ephemeral data structures), Time complexity and Space complexity, Asymptotic Notation - The Big-O, Omega and Theta notation, Algorithmic upper bounds, lower bounds, Best, Worst and Average case analysis of an Algorithm, Abstract Data Types (ADT)
☁️ 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.
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
Value Stream Mapping Worskshops for Intelligent Continuous SecurityMarc Hornbeek
This presentation provides detailed guidance and tools for conducting Current State and Future State Value Stream Mapping workshops for Intelligent Continuous Security.
ADVXAI IN MALWARE ANALYSIS FRAMEWORK: BALANCING EXPLAINABILITY WITH SECURITYijscai
With the increased use of Artificial Intelligence (AI) in malware analysis there is also an increased need to
understand the decisions models make when identifying malicious artifacts. Explainable AI (XAI) becomes
the answer to interpreting the decision-making process that AI malware analysis models use to determine
malicious benign samples to gain trust that in a production environment, the system is able to catch
malware. With any cyber innovation brings a new set of challenges and literature soon came out about XAI
as a new attack vector. Adversarial XAI (AdvXAI) is a relatively new concept but with AI applications in
many sectors, it is crucial to quickly respond to the attack surface that it creates. This paper seeks to
conceptualize a theoretical framework focused on addressing AdvXAI in malware analysis in an effort to
balance explainability with security. Following this framework, designing a machine with an AI malware
detection and analysis model will ensure that it can effectively analyze malware, explain how it came to its
decision, and be built securely to avoid adversarial attacks and manipulations. The framework focuses on
choosing malware datasets to train the model, choosing the AI model, choosing an XAI technique,
implementing AdvXAI defensive measures, and continually evaluating the model. This framework will
significantly contribute to automated malware detection and XAI efforts allowing for secure systems that
are resilient to adversarial attacks.
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
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.
We introduce the Gaussian process (GP) modeling module developed within the UQLab software framework. The novel design of the GP-module aims at providing seamless integration of GP modeling into any uncertainty quantification workflow, as well as a standalone surrogate modeling tool. We first briefly present the key mathematical tools on the basis of GP modeling (a.k.a. Kriging), as well as the associated theoretical and computational framework. We then provide an extensive overview of the available features of the software and demonstrate its flexibility and user-friendliness. Finally, we showcase the usage and the performance of the software on several applications borrowed from different fields of engineering. These include a basic surrogate of a well-known analytical benchmark function; a hierarchical Kriging example applied to wind turbine aero-servo-elastic simulations and a more complex geotechnical example that requires a non-stationary, user-defined correlation function. The GP-module, like the rest of the scientific code that is shipped with UQLab, is open source (BSD license).
some basics electrical and electronics knowledgenguyentrungdo88
CP Handout#3
1. C-Programming
Walchand Institute of Technology (RC1131), Solapur Page 1
Handout#3
Assignment/Program Statement:
Write a C program using variables, constants, data types, expressions and applying
type casting and type conversion rules.
Learning Objectives:
Students will be able to
- explain basic concepts of C such as variables, constants, data types
- write C code using variables, constants, data types, expressions
- apply type casting and type conversion rules in C
Theory:
What is Program?
A program is a sequence of instructions (called programming statements),
executing one after another - usually in a sequential manner
Variable:
In programming, a variable is a container (storage area) to hold data.
To indicate the storage area, each variable should be given a unique name
(identifier).
Variable names are just the symbolic representation of a memory location.
For example: int marks = 65;
In this example, "marks" is a variable of integer type. The variable is holding
value 65.
The value of a variable can be changed, hence the name 'variable'.
In C programming, you have to declare a variable before you can use it.
65
marks
Memory Representation
2. C-Programming
Walchand Institute of Technology (RC1131), Solapur Page 2
Constants/Literals:
A constant is a value or an identifier whose value cannot be altered in a
program.
For example:
const double PI = 3.14
Here, PI is a constant. Basically what it means is that, PI and 3.14 is same
for this program.
Following are the types of constants
1) Integer constants
2) Floating-point constants
3) Character constants
4) String constants
[Reference: http://www.programiz.com/c-programming/c-variables-constants ]
Data Types in C:
Data types simply refer to the type and size of data associated with variables
and functions.
The type of a variable determines how much space it occupies in storage and
how the bit pattern stored is interpreted.
C language supports 2 different type of data types – (1) Primary
(Fundamental) data types and (2) Derived data types
(1) Primary data types:
o These are fundamental data types in C namely integer(int),
floating(float), character(char) and void.
(2) Derived data types
o Derived data types are like arrays, pointers, structures and
enumeration.
[Reference: http://www.tutorialspoint.com/cprogramming/c_data_types.htm ,
http://www.programiz.com/c-programming/c-data-types and
http://www.studytonight.com/c/datatype-in-c.php ]
3. C-Programming
Walchand Institute of Technology (RC1131), Solapur Page 3
Operators in C:
An operator is a symbol that tells the compiler to perform specific
mathematical or logical functions.
C language provides the following types of operators -
1. Arithmetic Operators
2. Relational Operators
3. Logical Operators
4. Bitwise Operators
5. Assignment Operators
6. Misc Operators
[1] Arithmetic Operators:
The following table shows all the arithmetic operators supported by the C
language.
Operator Description Example
+ Adds two operands. A + B = 30
− Subtracts second operand from the first. A − B = 10
∗ Multiplies both operands. A ∗ B =
200
∕ Divides numerator by de-numerator. B ∕ A = 2
% Modulus Operator and remainder of after an integer
division.
B % A = 0
++ Increment operator increases the integer value by one. A++ = 11
-- Decrement operator decreases the integer value by one. A-- = 9
Assume variable A holds 10 and variable B holds 20.
Program:
#include<stdio.h>
void main()
{
4. C-Programming
Walchand Institute of Technology (RC1131), Solapur Page 4
int A = 10, B =20, C;
C = A + B;
printf(“n C=%d”, C);
}
Output: C=30
[2] Relational Operators:
The following table shows all the relational operators supported by C.
Operator Description Example
== Checks if the values of two operands are equal or
not. If yes, then the condition becomes true.
(A == B) is not
true.
!= Checks if the values of two operands are equal or
not. If the values are not equal, then the
condition becomes true.
(A != B) is true.
> Checks if the value of left operand is greater than
the value of right operand. If yes, then the
condition becomes true.
(A > B) is not true.
< Checks if the value of left operand is less than
the value of right operand. If yes, then the
condition becomes true.
(A < B) is true.
>= Checks if the value of left operand is greater than
or equal to the value of right operand. If yes,
then the condition becomes true.
(A >= B) is not
true.
<= Checks if the value of left operand is less than or
equal to the value of right operand. If yes, then
the condition becomes true.
(A <= B) is true.
[3] Logical Operators:
Following table shows all the logical operators supported by C language.
5. C-Programming
Walchand Institute of Technology (RC1131), Solapur Page 5
Operator Description Example
&& Called Logical AND operator. If both the operands are
non-zero, then the condition becomes true.
(A && B)
is false.
|| Called Logical OR Operator. If any of the two operands
is non-zero, then the condition becomes true.
(A || B) is
true.
! Called Logical NOT Operator. It is used to reverse the
logical state of its operand. If a condition is true, then
Logical NOT operator will make it false.
!(A && B)
is true.
[Reference: http://www.tutorialspoint.com/cprogramming/c_operators.htm ]
Type Conversion and Type casting in C
Type conversion occurs when the expression has data of mixed data types.
Examples of such expression include converting an integer value in to a float
value, or assigning the value of the expression to a variable with different
data type.
For example: int sum=17, count=5;
float mean;
mean = sum/count;
In type conversion, the data type is promoted from lower to higher because
converting higher to lower involves loss of precision and value.
Forced Conversion:
Forced conversion occurs when we are converting the value of the larger
data type to the value of the smaller data type or smaller data type to the
larger data type.
For example, consider the following assignment statement
int a;
float b;
a=5.5;
b=100;
6. C-Programming
Walchand Institute of Technology (RC1131), Solapur Page 6
Case-1: a=5.5 ; a is declared as int so the float value 5.5 cannot be stored in
a. In such a case float is demoted to an int and then its value is stored. Hence
5 is stored in a.
Case-2: b=100; since b is a float variable 100 is promoted to 100.000000
and then stored in b.
In general, the value of the expression is promoted or demoted depending on the
type of variable on left hand side of =.
Consider the following statement
int count = 5;
float sum = 17.5, mean;
mean = sum / count;
In the above statement, one operand is int where as other is float. During
evaluation of the expression the int would be promoted to floats and the
result of the expression would be a float. And result float value is assigned to
float mean variable. If mean declared as int then result will be demoted to int
type.
Forced conversion may decrease the precision.
Type casting is the preferred method of forced conversion
[Reference: http://datastructuresprogramming.blogspot.in/2010/02/type-
conversion-and-type-casting-in-c.html]
Type Casting (or) Explicit Type conversion:
Explicit type conversions can be forced in any expression, with a unary
operator called a cast.
Type casting is a way to convert a variable from one data type to another
data type.
Syntax:
(type-name) expression;
Example:
int n=5.5;
7. C-Programming
Walchand Institute of Technology (RC1131), Solapur Page 7
float x;
x=(float)n;
printf(“n X=%f”,x);
The above statement will convert the value of n to a float value before assigning to
x but n is not altered.
Program:
main() {
int sum = 17, count = 5;
float mean;
mean = (float) sum / count;
printf("n Mean = %f ", mean );
}
Output: Mean = 3.000000 /*without typecasting*/
Output: Mean = 3.400000 /*with typecasting*/
Conclusion:
Thus C programs, using variables, constants, data types, expressions and applying
type casting and type conversion rules, is implemented.
Learning Outcomes:
At the end of this assignment, students are able to
- explain basic concepts of C such as variables, constants, data types
- write C code using variables, constants, data types, expressions
- apply type casting and type conversion rules in C