In C, return type of getchar(), fgetc() and getc() is int (not char). So it is recommended to assign the returned values of these functions to an integer type variab...
Share
scanf family functions support scanset specifiers which are represented by %[]. Inside scanset, we can specify single character or range of characters. While processi...
Share
In C printf(), %n is a special format specifier which instead of printing something causes printf() to load the variable pointed by the corresponding argument with a...
Share
Asked by Tanuj
Here is the standard prototype of printf function in C.
int printf(const char *format, ...);
The format string is composed of zero or more ...
Share
printf:
printf function is used to print character stream of data on stdout console.
Syntax :
int printf(const char* str, ...);
Example :
// simple prin...
Share
What values do the printf() and scanf() functions return ?
printf() : It returns total number of Characters Printed, Or negative value if an output error or an e...
Share
In C, given a string variable str, which of the following two should be preferred to print it to stdout?
1) puts(str);
2) printf(str);
puts() can be preferre...
Share
fflush() is typically used for output stream only. Its purpose is to clear (or flush) the output buffer and move the buffered data to console (in case of stdout) or d...
Share
All of these functions read a character from input and return an integer value. The integer is returned to accommodate a special value used to indicate failure. Th...
Share
Below are some interesting facts about C programming:
1) The case labels of a switch statement can occur inside if-else statements.
#include <stdio.h> ...
Share