C code: smiley o/p

PRIYADHARSHINI ARIVALAHAN

PRIYADHARSHINI ARIVALAHAN

@priyadharshini-xKL9pR Oct 26, 2024
Here is the code and the output.
I don't understand why the output is a smiley.
Can someone explain?

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

Welcome, guest

Join CrazyEngineers to reply, ask questions, and participate in conversations.

CrazyEngineers powered by Jatra Community Platform