C code: smiley o/p

Here is the code and the output.
I don't understand why the output is a smiley.
Can someone explain?

#include
#include
void main()
{
char *s="hello world";
clrscr();
printf("%.*s", *s);
getch();
}

Replies

You are reading an archived discussion.

Related Posts

Reliance Jio, the Reliance Industries Limited (RIL) owned telecom operator almost doubled the average download speed in January 2017 at 17.42Mbps over December 2016, according to TRAI; reports LiveMint. The...
Tata Motors has come up with a new variant of their popular hatchback Tata Tiago, now equipped with AMT (Automated Manual Transmission) to offer its customers a more pleasurable driving...
Fitbit, the go-to name in fitness trackers has launched the successor of last year’s Fitbit Alta. The Fitbit Alta HR was launched a few days ago in the US and...
Remember the time Xiaomi launched a Smart Rice Cooker under its crowd-funded Mijia brand? This showed Xiaomi’s determination to make itself a fully fledged electronics brand and put itself next...
Howdy everyone I am Boris, I am new to this site. Hope I will get good tips from like minded persons. Thank you very much for creating this great platform