what is the diffrence between ++x , x++ pleaaaaase ???
Answer Posted / sailaxmi
++x is pre-increment
say for example
the value of a=1
int a,r;
r= ++a;
now the value of "a" is incremented to 2 n then assigned to r...
x++ is post increment
say for exmaple
the value of a is 3
int a,r;
r=a++;
the value of a(initially 3) will be assigned to r..... n
then the value of "a" gets incremented to 4.
| Is This Answer Correct ? | 6 Yes | 1 No |
Post New Answer View All Answers
write a program to calculate the amount of investment after a period n years if the principal investors was p and interest is calculated using compound interest,formular=a=p(1+r)^n
i really need help about this.. write a program to display the set of odd and even numbers separately. find the highest and lowest value of the given numbers.
write a program to convert temperature from fa height into celcius and vise versa,use modular programming
create a stucture student containing field for roll no,class,year and marks.create 10 student annd store them in a file
write a program that prompt the user to enter his height and weight,then calculate the body mass index and show the algorithm used
develop a program to calculate and print body mass index for 200 employees
Write a C++ program without using any loop (if, for, while etc) to print prime numbers from 1 to 100 and 100 to 1 (Do not use 200 print statements!!!)
3. Program to find the Sum of give series. a. (1)+(1+2)+(1+2+3)+(1+2+3+4)+……………………………….. b. 1/1+1/9+1/25+1/49+……………...
write a function that reverse the elements of an array in place.The function must accept only one pointer value and return void.
Code for Two Classes for Doing Gzip in Memory?
Definition of priority queue was given. We have to implement the priority queue using array of pointers with the priorities given in the range 1..n. The array could be accessed using the variable top. The list corresponding to the array elements contains the items having the priority as the array index. Adding an item would require changing the value of top if it has higher priority than top. Extracting an item would require deleting the first element from the corresponding queue. The following class was given: class PriorityQueue { int *Data[100]; int top; public: void put(int item, int priority); // inserts the item with the given priority. int get(int priority); // extract the element with the given priority. int count(); // returns the total elements in the priority queue. int isEmpty(); // check whether the priority queue is empty or not. }; We had to implement all these class functions.
Code for Small C++ Class to Transform Any Static Control into a Hyperlink Control?
We need to write the function to check the password entered is correct or not based on the following conditions.. a) It must have atleast one lower case character and one digit. b)It must not have any Upper case characters and any special characters c) length should be b/w 5-12. d) It should not have any same immediate patterns like abcanan1 : not acceptable coz of an an pattern abc11se: not acceptable, coz of pattern 11 123sd123 : acceptable, as not immediate pattern adfasdsdf : not acceptable, as no digits Aasdfasd12: not acceptable, as have uppercase character
1+1/2!+1/3!+...+1/n!
how to take time as input in the format (12:02:13) from user so that controls remains between these columns?