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;
}
Compound Assignment Operators Apart from the binary and the unary arithmetic operators, we also have compound assignment operators. These are +=, -=, *=, /=, %=. Using these op
A: No. (Excluding if you have an old compiler, you might have to force the new operator to throw an exception if it runs out of memory.) This turns out to be a real pain to alwa
How to run in C++
A: In C++ a struct is alike to a class except for the default access specifier( refer to other question in the document). In C we ought to include the struct keyword while declarin
what will be the c program for ideal gas equation.
What is the difference between JavaScript and PHP? The difference lies with the execution of languages. PHP is server side scripting language, which means that it cannot intera
Write a program which incorporates a function named compute and which is used to calculate the area and circumference of a circle. Use the main function for inputs and outputs.
Why shouldn't Matrix class's interface look like an array-of-array? A: Some people build a Matrix class that has an operator[] that returns a reference to an Array object (or po
keypad
Need assignment help What's the order that local objects are destructed?
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: +91-977-207-8620
Phone: +91-977-207-8620
Email: [email protected]
All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd