Simple question about putchar ... in C
Is this the only way to have a newline after a putchar?
#include <stdio.h> int main(void) { char letter = 'Y'; putchar(letter); printf("\n"); return 0; } thanks New C programmer :) |
You could also use putchar('\n').
'\n' is one character, so you could also declare: char letter = '\n' |
All times are GMT -5. The time now is 07:04 AM. |