ARRAYS
IPTG
ARRAYS
ARRAY
IS A COLLECTION OF VARIABLES
OF THE SAME TYPE.
ARRAY IS REFERRED TO THROUGH A
COMMON NAME.
ARRAY OCCUPIES CONTIGUOUS MEMORY
LOCATIONS.
2
SINGLE DIMENSION ARRAYS
GENERAL
FO
Math October 14, 2008
Tutorial 3: Matrices Part-II
Consistency and Inconsistency
The system of equations is said to be consistent if it has atleast one solution and incosistent
if it has no solution.
Math October 21, 2008
Tutorial 4: Matrices Part-III
Caley - Hamilton Theorem:
Every square matrix satises its own characteristic equation. i.e. The theorem states that,
for a square matrix A of order
Pandit Deendayal Petroleum University
School of Petroleum Technology
Tutorial Sheet- I
Mathematics II
1. Find a series of sines and cosines of multiples of , which will represent in the interval .
Fin
Pandit Deendayal Petroleum University
School of Petroleum Technology
Tutorial Sheet- II
Mathematics II
1. If find
(i)
, when t=0,
(ii)
when t=1.
(iii) , when
and (iv) when .
2. If , find where
3. A pa
Pandit Deendayal Petroleum University
School of Petroleum Technology
Tutorial Sheet- IV for semester II
Mathematics II
1. Solve the following equations:
(i)
(ii)
(iii)
(iv)
(v)
(vi)
(vii)
(viii)
2. De
Tutorial Sheet Thermodynamics
1. Write down notes on zeroth and first law of thermodynamics.
2. Distinguish between isothermal and adiabatic expansion.
3. Deduce the relation between pressure and volu
COMPILING A PROGRAM
IPTG
WRITING & SAVING
A PROGRAM
USE
NOTEPAD OR WORDPAD TO WRITE A
PROGRAM.
SAVE THE PROGRAM IN THE DIRECTORY
CALLED C:\BORLAND\CPP DIRECTORY.
WHEN YOU SAVE THE PROGRAM, WRITE
FI
CONSTRUCTORS
&
DESTRUCTORS
IPTG
INTRODUCTION
WE
2
WRITE
int i = 0; / valid statement
but
WE CAN NOT INITIALIZE VARIABLES
DIRECTLY WHEN WE DEFINE ANY CLASS.
why?
THE MEMORY ALLOCATION WOULD BE
DONE
EXCEPTIONS
IPTG
INTRODUCTION
WHEN
2
WE WRITE ANY PROGRAM, THERE
MAY BE ERRORS OR BUGS IN IT.
TWO TYPES OF BUGS/ ERRORS:
SYNTAX ERRORS.
LOGICAL ERRORS.
SYNTAX ERRORS: DUE TO POOR
UNDERSTANDING OF
FLOATING POINT
REPRESENTATION
NUMBERS HAVING AN INTEGER
PART AND A FRACTIONAL PART, IS
CALLED A REAL NUMBER OR
FLOATING-POINT NUMBER.
IT CAN BE EITHER +VE OR VE.
EVERY NO. CAN BE REPRESENTED
IN SCIENT
FUNCTION OVERLOADING
IPTG
FUNCTION OVERLOADING
KNOWN
AS FUNCTION POLYMORPHISM
ALSO.
OVERLOADING MEANS USING SAME THING
FOR DIFFERENT PURPOSES.
FEATURE OF C+ AND NOT C.
USING THE CONCEPT, WE CAN D
INHERITANCE
IPTG
INHERITANCE
INHERITANCE
IS THE PROCESS BY WHICH
OBJECTS OF ONE CLASS ACQUIRE THE
PROPERTIES OF OBJECTS OF ANOTHER
CLASS.
IT SUPPORTS THE CONCE PT OF
HIERARCHICAL CLASSIFICATION.
E.
Write following programs using
SWITCH -CASE-DEFAULT.
1. Display the following menu and work
accordingly.
MAIN MENU
1. ADD TWO NUMBERS
2. SUBTRACT TWO NUMBERS
3. MULTIPLY TWO NUMBERS
4. DIVIDE TWO NUMB
Exercise 1.
A heat engine working between 150C
and 50C.
What is the minimum heat withdrawal
from the heat source to yield 1.3 kJ of
work?.
Exercise 2.
A Carnot engine working between 100C
and 300C abs
Exercise 1.
A heat engine working between 150C
and 50C.
What is the minimum heat withdrawal
from the heat source to yield 1.3 kJ of
work?.
Exercise 2.
A Carnot engine working between 100C
and 300C abs
http:/123techbooks.blogspot.com/
IMPRTANT FORMULAS
PROBLEMS ON TRAINS:
1. Speed, Time and Distance:
Speed =
Distance
Time
, Time =
Distance
Speed
, Distance = (Speed x Time).
2. km/hr to m/sec convers
Tutorial Sheet on Vacuum Science & Technology
Describe the various types of gas flow in a vacuum system in terms of
mean free path and viscosity. Explain the physical significance of the curve
pressur
Tryst with Destiny
14-15 August, 1947
-Jawaharlal Nehru
With the clock striking the midnight hour on 14-15th August, 1947, India was 'to
awake to freedom'. The Constituent Assembly to whom power was t
SWITCH
IPTG
SWITCH
WE
KNOW THAT WE CAN WRITE
EXPRESSION WITHIN SWITCH.
WE ALSO KNOW THAT THE RESULT OF
EXPRESSION SHOULD BE EITHER INTEGER
OR CHAR.
WRITE
A PROGRAM TO FIND LARGEST OUT
OF TWO NUMBER
C/C+
Institute of Petroleum
Technologies, Gandhinagar
PLEASE
SWITCH OFF
YOUR
MOBILE.
BOOKS
C+ Program Design
by Cohoon & Davidson
Tata McGraw Hill
3rd Edition
A first Book of C+
by Gary Bronson,
The fundamental equations
Five state functions in the First and Second Laws:
The internal energy: U
The entropy: S
The enthalpy: H
The Helmholtz energy: A
The Gibbs energy: G
H=U+pV
A=U-TS
G= H-TS = U
THERMODYNAMICS OF PURE
AND REAL SUBSTANCES
CHEMICAL POTENTIAL OF PURE SUBSTANCE
Partial molar quantities
V, U, H, S, and G (general X) are extensive properties. X
depends on not only T and p, but also
Math September 30, 2008
Tutorial 1: Matrices Part-I
1. Find the inverse of a given matrix using Gauss-Jordan method and verify the answer
by any other method.
2
3
12
1
12
(a)
; (b) 4 2 4 4 5
37
37 4
2
Math October 07, 2008
Tutorial 2: Matrices Part-II
Row-reduced Echelon Form: It is a matrix such that
1. Each row that consists entirely of zeros is below each row which contains a non-zero
entry.
2.
NUMBER SYSTEMS
BY
DARSHIT SHAH
INATITUTE OF PETROLEUM
TECHNOLOGY, GANDHINAGAR
DIFFERENT NUMBER SYSTEMS
DECIMAL
BINARY
OCTAL
HEXADECIMAL
ASCII
UNICODE
DIFFERENT NUMBER SYSTEMS
BCD
EBCDIC
DECIMAL NUMB
OBJECT ORIENTED SYSTEMS
DEVELOPMENT
IPTG
INTRODUCTION
SOFTWARE
ENGINEERS USE DIFFERENT
TOOLS, METHODS AND PROCEDURES TO
CONTROL THE PROCESS OF SOFTWARE
DEVELOPMENT.
THE PURPOSE:BUILD HIGH-QUALITY
SO
OPERATOR OVERLOADING
IPTG
INTRODUCTION
WE
USE DIFFERENT OPERATORS LIKE +, -, *
ON BASIC DATA TYPES LIKE INT, FLOAT OR
DOUBLE.
CAN
WE USE THEM FOR USER DEFINED
DATA TYPES LIKE ARRAY,STRUCTURE OR
CLAS
PARTIALDIFFERENTIAL
EQUATIONS:
v PartialDifferentialEquations(PDE)arethose
equationswhichcontainpartialdifferential
coefficients,independentvariablesanddependent
variables.
v Theindependentvariableswi