What are all the possible stamements that can be used in C, instead of printf and scanf statements?

Recommended Answers

All 3 Replies

I think you need a reference. You can also check the header files on your own computer, installed by the compiler.

you can also use "s" for scanf or "p" or printf.
you can do so by declaring the two variables after the #include statement.

here's how:
#define p printf
#define s scanf

>#define p printf
>#define s scanf

No. Just no. This is really bad practise, not only should you avoid macros where possible, it's also generally a bad idea to rename functions, it reduces code readability and makes it harder for someone else to debug your code, on top of this what if someone makes a genuine function called p or s? Yeah, it's going to cause you a massive headache.

In short, don't do it.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.