What is the program doing ? cplusplus

  c++
#include <iostream>
using namespace std;

void updateValue(int *p){
    *p = 610 % 255;
}

int main(){
    char ch = 'A';
    updateValue((int*)&ch);
    cout << ch;
}

Dear Friends why output is d ?
please explain updateValue((int*)&ch) line means?

Source: Windows Questions C++

2 thoughts on - What is the program doing ? cplusplus

LEAVE A COMMENT