Already have an account? Get multiple benefits of using own account!
Login in your account..!
Remember me
Don't have an account? Create your account in less than a minutes,
Forgot password? how can I recover my password now!
Enter right registered email to receive password!
Pointer Arithmetic
We can manipulate the pointers too. We can perform operations such as addition, subtraction, increment and decrement etc.,. As the pointer variables have address, adding or subtracting a number results in another address, which is at an offset from the original address. This may be memory address occupied by another variable.
e.g.
int i, j, k ;
int *iptr = &i;
*iptr = *iptr + 2; // I = I + 2;
iptr = iptr + 2 // adds 2 to address.
These are useful when using arrays.
arr[10];
int *iptrb = &arr[0];
int *iptre = &arr[10];
While ( iptrb != iptre)
{
Do something with the value if (*iptrb);
++iptrb;
}
Define a class polynomial with three private data members a, b and c of type double to represent the coefficient of two degree polynomial(ax^2+bx+c). Include a constructor in a pol
C program to demonstrate Pointer to array: void p2a(int *); void main() { int x=10, *a,**b; int arr[5]; a=&x;//po
Convert compass heading in degrees (0-360 degrees)to compass bearing. A compass bearing consist of three items namely: a.The direction you face (North or South) b.An angle betwe
Luminous Jewels - The Polishing Game Byteland county is very famous for luminous jewels. Luminous jewels are used in making beautiful necklaces. A necklace consists of various lum
Define Bitwise-Shift Operators? The shift operators perform suitable shift by operator on the right to the operator on the left. The right operator should be positive. The va
(a) Write a procedure (count-even n) that counts the number of even digits in the decimal representation of the number n. For example, (count-even 234) should return 2. (b) Writ
Write a programme to display the patern.. A A B A C B A B C A B A A
1 Aims The main purpose of the assignment is to let you practice the following programming techniques: perform operations on pointers to basic and more complex types;
compose a C program to solve the equation z2=(p1/Pg)+(v1^2/2g)+z1 p1=100kpa,v1=2m/s z1=3m P=1000kg/m^3 define g=9.81
Aim: To implement a program for following string operations: Length of String. String Concatenation. Substring (provide start index and length) Find character a
Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!
whatsapp: +1-415-670-9521
Phone: +1-415-670-9521
Email: [email protected]
All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd