C++ Output Questions
- Find Error/Output in follwing code:
- 910
- 920
- 870
- 900
#include <iostream>
using namespace std;
void square (int *x) {
*x = (*x)++ * (*x);
}
void square (int *x, int *y) {
*x = (*x) * --(*y);
}
int main ( ) {
int number = 30;
square(&number, &number);
cout << number;
return 0;
}
Added By : Sumit
Also Exercise
Post Your Question
Social Sharing
Search
Articles
Recently Added Jobs
Rajasthan High Court - Jodhpur Recruitment 2017 for Civil Judges
Last Date: 21 December, 2017
Last Date: 21 December, 2017
WBSEDCL Recruitment - 2017 for Office Executive
Last Date: 16 May, 2017
Last Date: 16 May, 2017
RECRUITMENT OF PROBATIONARY OFFICERS IN STATE BANK OF INDIA
Last Date: 06 March, 2017
Last Date: 06 March, 2017
UPSC Combined Medical Services Examination 2015
Last Date: 10 April, 2015
Last Date: 10 April, 2015
UPSC Engineering Services Examination 2015
Last Date: 10 April, 2015
Last Date: 10 April, 2015