When we are travelling from an African country to Schengen Area, USA or Canada, Do 'immigration officer at the departure point' check visa validity(real or fake) electronically?
That would most likely only happen in countries that don't want their citizens to leave. For example, the USA doesn't care much if you leave the country without a valid visa (they may care if you leave while being accused of a serious crime, but for that they would check your identity, not your visa).
The ones who do care are the airlines. That's because if you fly from country A to country B without a required visa, country B will send you right back to country A, at the expense of the airline, and the airline will likely be fined. Obviously the airline doesn't like that at all, so the airline will check that everything is Ok.