Archive

Posts Tagged ‘printf’

some C fun

Monday, 3 December 2007 Leave a comment


int main()
{
char charptr[30], ch[30];
scanf("%s %*s %s", charptr, ch);
printf("%s %s", charptr, ch);

scanf("%3c", ch);
printf("%s", ch);
system("PAUSE");
}

can’t test cin.scan in windows (as GNU extension is not ported in g++/win32)

Categories: Programming Tags: ,
Follow

Get every new post delivered to your Inbox.

Join 189 other followers