Skip to content

Instantly share code, notes, and snippets.

@LadaF
Created April 23, 2011 10:29
Show Gist options
  • Save LadaF/938529 to your computer and use it in GitHub Desktop.
Save LadaF/938529 to your computer and use it in GitHub Desktop.
C Hello world with pointers
# include <stdio.h>
char* ch;
struct typ{
int i,j;
float a,b;
};
struct typ t;
int main(void)
{
t.i=*(int *) &"Hell";
t.j=*(int *) &"o Wo";
t.a=*(float *) &"rld!";
t.b=*(float *) &"\n\0 ";
ch=(char *)&t.i;
printf("%s",ch);
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment