I/O in c without printf and scanf.

Problem I/O in c without printf and scanf. Method 1 - getchar and putchar int getchar(); int putchar(int value); Sample Program #include <stdio .h> int main(void) { int c; while ((c = getchar()) != EOF) { putchar(c); } return 0; } Note the use of parentheses. c=gethar()!=EOF implies whether c = 0 or 1 depending on whether character get is not EOF or is EOF. EOF is 257 , so use int rather than char. [Read More]

C preprocessor

The C preprocessor (cpp) is the preprocessor for the C programming language. In many C implementations, it is a separate program invoked by the compiler as the first part of translation. The preprocessor handles directives for source file inclusion (#include), macro definitions (#define), and conditional inclusion (#if). The language of preprocessor directives is not strictly specific to the grammar of C, so the C preprocessor can also be used independently to process other types of files. [Read More]

Complicated Declaration

Function Declaration

Function

Returning

Accepting

int *f();

int ptr

any number of arg in c and no arg in cpp

char(*(*f())[10])();

pointer to the array of pointers to function

int (*(*f())[10]) ()

pointer to the array of 10 pointers to function that returns integer

Pointer

Expression

p is the pointer to

int *p;

iint **p;

int (*p)();

function that returns the integer

int (*p)[30]

array of 30 int